SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By dantengwen
We were going along great with the instructions for tjbot

but everytime we got to the step of installing npm we hit a barrier
We have tried it several different approaches from sparkfuns directions to instructions found on instructables and the fail seems to always happen at the same place

Here is the latest set of errors

pi@raspberrypi:~/tjbot/recipes/speech_to_text $ npm install
(node:1487) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

> sleep@5.1.1 install /home/pi/tjbot/recipes/speech_to_text/node_modules/tjbot/node_modules/sleep
> node-gyp rebuild

Traceback (most recent call last):
File "/usr/share/node-gyp/gyp/", line 9, in <module>
load_entry_point('gyp==0.1', 'console_scripts', 'gyp')()
File "/usr/lib/python2.7/dist-packages/gyp/", line 545, in script_main
return main(sys.argv[1:])
File "/usr/lib/python2.7/dist-packages/gyp/", line 538, in main
return gyp_main(args)
File "/usr/lib/python2.7/dist-packages/gyp/", line 502, in gyp_main
'cwd': os.getcwd(),
OSError: [Errno 2] No such file or directory
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:304:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.14.52-v7+
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/tjbot/recipes/speech_to_text/node_modules/tjbot/node_modules/sleep
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! error rolling back Error: ENOTEMPTY: directory not empty, rmdir '/home/pi/tjbot/recipes/speech_to_text/node_modules/tjbot/node_modules/asyncawait/node_modules/lodash'
npm ERR! error rolling back tjbot@1.4.0 { Error: ENOTEMPTY: directory not empty, rmdir '/home/pi/tjbot/recipes/speech_to_text/node_modules/tjbot/node_modules/asyncawait/node_modules/lodash'
npm ERR! error rolling back errno: -39,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back syscall: 'rmdir',
npm ERR! error rolling back path: '/home/pi/tjbot/recipes/speech_to_text/node_modules/tjbot/node_modules/asyncawait/node_modules/lodash' }
npm ERR! Error: Method Not Allowed
npm ERR! at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
npm ERR! at /usr/share/npm/lib/cache/add-named.js:203:12
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR! at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <>
npm ERR! System Linux 4.14.52-v7+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/tjbot/recipes/speech_to_text
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code E405
npm ERR! tar.unpack untar error /home/pi/.npm/winston/2.4.3/package.tgz
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read

> rpi-ws281x-native@0.8.2 install /home/pi/tjbot/recipes/speech_to_text/node_modules/tjbot/node_modules/rpi-ws281x-native
> node-gyp rebuild

pi@raspberrypi:~/tjbot/recipes/speech_to_text $