I've got 2 ENOENT errors. I know "ENOENT" means "Error NO ENTrance", but what exactly is missing in these two ENOENTs? What do these error messages mean? I would like to decipher them to be able to debug the problems.
npm ERR! Error: ENOENT, lstat '/home/ubuntu/.npm/iconv-lite/0.2.11/package/encodings/table/gbk.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 3.2.0-54-virtual
npm ERR! command "/home/ubuntu/local/bin/node" "/home/ubuntu/local/bin/npm" "install"
npm ERR! cwd /home/ubuntu/app_e
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /home/ubuntu/.npm/iconv-lite/0.2.11/package/encodings/table/gbk.js
npm ERR! fstream_path /home/ubuntu/.npm/iconv-lite/0.2.11/package/encodings/table/gbk.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /home/ubuntu/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
and
npm ERR! Error: ENOENT, chmod '/home/ubuntu/app_f/node_modules/grunt/lib/grunt/util.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 3.2.0-54-virtual
npm ERR! command "/home/ubuntu/local/bin/node" "/home/ubuntu/local/bin/npm" "install"
npm ERR! cwd /home/ubuntu/app_f
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /home/ubuntu/app_f/node_modules/grunt/lib/grunt/util.js
npm ERR! fstream_path /home/ubuntu/app_f/node_modules/grunt/lib/grunt/util.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chmod
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /home/ubuntu/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http GET https://registry.npmjs.org/graceful-fs
One seems to have an "lstat" problem on gbk.js, the other an "chmod" problem on util.js, but what about the commands "node", "npm" and "install", "cwd", "fstream", and Object.oncomplete?
Here is writer.js:284.
Here is writer.js:305.
Reading the error line: Error: ENOENT, lstat '/home/ubuntu/.npm/iconv-lite/0.2.11/package/encodings/table/gbk.js'
It means that when doing something like fs.lstat('/home/ubuntu/.npm/iconv-lite/0.2.11/package/encodings/table/gbk.js', ...), npm received ENOENT error. Which means the file was missing, but npm expected it to be there.
And for the second one, npm was doing something like fs.chmod('/home/ubuntu/app_f/node_modules/grunt/lib/grunt/util.js', ...) and npm received ENOENT error.
The rest are debug information. These all are some variables/properties at the time error happened:
npm ERR! System Linux 3.2.0-54-virtual --> THis is the system type
npm ERR! command "/home/ubuntu/local/bin/node" "/home/ubuntu/local/bin/npm" "install" --> the command that was issued
npm ERR! cwd /home/ubuntu/app_f --> The current working directory
npm ERR! node -v v0.10.26 --> You should know this one!
npm ERR! npm -v 1.4.3 --> You should know this one!
npm ERR! path /home/ubuntu/app_f/node_modules/grunt/lib/grunt/util.js
These are about fstream module. It Indicates what was it doing exactly.
npm ERR! fstream_path /home/ubuntu/app_f/node_modules/grunt/lib/grunt/util.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chmod
This is the stacktrace(something like output of conosle.log(new Error().stack)) when the error happened:
npm ERR! fstream_stack /home/ubuntu/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
One quirk with reading NPM logs: gotta look at the very first error in the stream. An error upstream can cause files to go missing, resulting in many errors like the one you are reporting above.
Try going to the top of the log, then scrolling down until you find the initial, first error.
Related
I followed the instructions: http://learnsemantic.com/guide/expert.html
And I got to the point where I should run this command:
npm install -g gulp
I get the following result:
npm ERR! 'Object.oncomplete (fs.js:107:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.19.0-16-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "gulp"
npm ERR! cwd /home/yannick
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules
npm ERR! fstream_path /usr/local/lib/node_modules/gulp
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules'
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:171:23
npm ERR! fstream_stack /usr/lib/nodejs/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/yannick/npm-debug.log
npm ERR! not ok code 0
Can anyone tell me what I am doing wrong?
Solved! The answer can be found here: https://github.com/joyent/node/issues/3911#issuecomment-8956154
:)
The key is line 3,
npm ERR! Please try running this command again as root/Administrator.
Try running the command as a sudo user or even better make sure that you can install npm modules globally without needing the sudo command. The guide I last used can be found is here: https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md
I was running node and npm absolutely fine, till today. I am trying to install gulp.
sudo npm install -g gulp and I get a crazy list of errors.
I have tried to re-install node via the Mackintosh Installer, however no difference. Not sure what I was running before the re-install, but now I am running latest stable versions of node and npm.
The same happens if I try to install any node packages. Any suggestions?
ahm:www ahmet$ node -v
v0.10.29
ahm:www ahmet$ npm -v
1.4.14
ahm:www ahmet$ sudo npm install -g gulp
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative'
npm ERR! error rolling back gulp-util#2.2.19 { [Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative' }
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/lodash'
npm ERR! error rolling back gulp#3.8.5 { [Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/lodash']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/lodash' }
npm ERR! Error: ENOENT, open '/usr/local/lib/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "gulp"
npm ERR! cwd /Applications/AMPPS/www
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /usr/local/lib/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/glob/README.md'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "gulp"
npm ERR! cwd /Applications/AMPPS/www
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /usr/local/lib/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/glob/README.md
npm ERR! fstream_path /usr/local/lib/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/glob/README.md
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "gulp"
npm ERR! cwd /Applications/AMPPS/www
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js
npm ERR! fstream_path /usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, chown '/usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/node_modules/globule/Gruntfile.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "gulp"
npm ERR! cwd /Applications/AMPPS/www
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/node_modules/globule/Gruntfile.js
npm ERR! fstream_path /usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/node_modules/globule/Gruntfile.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chown
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:133:7
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/LICENSE.txt'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "gulp"
npm ERR! cwd /Applications/AMPPS/www
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /usr/local/lib/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/LICENSE.txt
npm ERR! fstream_path /usr/local/lib/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/LICENSE.txt
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/LICENSE.txt'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "gulp"
npm ERR! cwd /Applications/AMPPS/www
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /usr/local/lib/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/LICENSE.txt
npm ERR! fstream_path /usr/local/lib/node_modules/gulp/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/LICENSE.txt
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/glob.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "gulp"
npm ERR! cwd /Applications/AMPPS/www
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/glob.js
npm ERR! fstream_path /usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/glob.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/minimatch.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "gulp"
npm ERR! cwd /Applications/AMPPS/www
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/minimatch.js
npm ERR! fstream_path /usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/minimatch/minimatch.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys'
npm ERR! error rolling back vinyl-fs#0.3.4 { [Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash._shimkeys' }
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "gulp"
npm ERR! cwd /Applications/AMPPS/www
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt
npm ERR! fstream_path /usr/local/lib/node_modules/gulp/node_modules/vinyl-fs/node_modules/lodash.defaults/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/lodash/lodash.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "gulp"
npm ERR! cwd /Applications/AMPPS/www
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /usr/local/lib/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/lodash/lodash.js
npm ERR! fstream_path /usr/local/lib/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/lodash/lodash.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at process.addListener (events.js:160:15)
at process.on.process.addListener (node.js:773:26)
at spinner (/usr/local/lib/node_modules/npm/node_modules/char-spinner/spin.js:35:13)
at Object.npm.spinner.start (/usr/local/lib/node_modules/npm/lib/npm.js:172:25)
at Object.commandCache.(anonymous function) (/usr/local/lib/node_modules/npm/lib/npm.js:202:19)
at /usr/local/lib/node_modules/npm/lib/cache.js:289:18
at c (/usr/local/lib/node_modules/npm/lib/cache.js:129:12)
at /usr/local/lib/node_modules/npm/lib/cache.js:145:5
at process._tickCallback (node.js:419:13)
I had to delete my .npm folder, then install npm again to get this working.
sudo rm -rf ~/.npm
sudo npm install -g npm#1.4.14
Once I had done this, I was able to run sudo npm install -g gulp without issue.
I faced similar problem before in my server, it was solved by clearing the npm cache by below commands:
# rm -rf ~/.npm
# npm cache clear
Or you can just clear the physical folder at
C:\Users\{{USERFolder}}\AppData\Roaming\npm-cache
source : http://origin1tech.wordpress.com/2013/08/31/clearing-nodes-npm-cache/
When installing topojson (sudo npm install -g topojson) I get the following errors:
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127. while trying to load binding.gyp
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:431:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-24-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gypnpm ERR!http GET https://registry.npmjs.org/assert-plus/0.1.2
cwd /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
npm gyp ERR!http not ok
GET https://registry.npmjs.org/asn1/0.1.11
npm http GET https://registry.npmjs.org/ctype/0.5.2
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/cssstyle/lib/properties'
npm ERR! error rolling back jsdom#0.5.7 { [Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/cssstyle/lib/properties']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/cssstyle/lib/properties' }
npm ERR! Error: ENOENT, open '/usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/cssstyle/lib/properties/webkitUserSelect.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "topojson"
npm ERR! cwd /home/peter
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/cssstyle/lib/properties/webkitUserSelect.js
npm ERR! code ENOENT
npm ERR! errno 34
npm http 304 https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/async
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/request/node_modules/hawk/images/logo.png'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "topojson"
npm ERR! cwd /home/peter
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/request/node_modules/hawk/images/logo.png
npm ERR! fstream_path /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/request/node_modules/hawk/images/logo.png
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/request/node_modules/tough-cookie/lib/cookie.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "topojson"
npm ERR! cwd /home/peter
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/request/node_modules/tough-cookie/lib/cookie.js
npm ERR! fstream_path /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/request/node_modules/tough-cookie/lib/cookie.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/topojson/node_modules'
npm ERR! error rolling back topojson#1.6.14 { [Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/topojson/node_modules']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/topojson/node_modules' }
npm ERR! weird error 1
npm http 304 https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/asn1/0.1.11
npm http 304 https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/delayed-stream/0.0.5
npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/peter/npm-debug.log
npm ERR! not ok code 0
I'm running on Ubuntu 14.04 with all updates installed. The versions of my tools are:
npm: 1.3.10
nodejs: v0.10.25
node-gyp: v0.10.10
I looked into the first mentioned path (/usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules) but only found request and not contextify. This suggest that the dependency of a dependency of topojson had problems?
And the additional log which should be found at /home/peter/npm-debug.log doesn't exist.
I'm attempting to use Node to install an angular package for yeoman. Here's the command I run
"npm install -g generator-angular"
Everything seems to work until I get this error
node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:65:16)
gyp ERR! stack at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:66:37)
gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:150:20)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:93:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:659:7)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:101:17)
gyp ERR! stack at maybeClose (child_process.js:773:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:840:5)
gyp ERR! System Linux 3.8.0-37-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v0.11.10-pre
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
Further down, it returns this error.
npm ERR! Error: ENOENT, lstat '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/cssstyle/lib/properties/webkitFlexFlow.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 3.8.0-37-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "generator" "angular"
npm ERR! cwd /home/colin
npm ERR! node -v v0.11.10-pre
npm ERR! npm -v 1.3.15
npm ERR! path /home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/cssstyle/lib/properties/webkitFlexFlow.js
npm ERR! fstream_path /home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/cssstyle/lib/properties/webkitFlexFlow.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:97:15)
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules/hawk/test'
npm ERR! error rolling back jsdom#0.8.11 { [Error: ENOTEMPTY, rmdir '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules/hawk/test']
npm ERR! error rolling back stack: 'Error: ENOTEMPTY, rmdir \'/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules/hawk/test\'',
npm ERR! error rolling back errno: -39,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules/hawk/test' }
npm ERR! Error: ENOENT, open '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 3.8.0-37-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "generator" "angular"
npm ERR! cwd /home/colin
npm ERR! node -v v0.11.10-pre
npm ERR! npm -v 1.3.15
npm ERR! path /home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js
npm ERR! code ENOENT
npm ERR! errno -2
npm WARN optional dep failed, continuing hawk#1.0.0
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules'
npm ERR! error rolling back angular#1.2.16 { [Error: ENOTEMPTY, rmdir '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules']
npm ERR! error rolling back stack: 'Error: ENOTEMPTY, rmdir \'/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules\'',
npm ERR! error rolling back errno: -39,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/home/colin/npm/lib/node_modules/angular/node_modules/jsdom/node_modules/request/node_modules' }
npm ERR! contextify#0.1.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify#0.1.8 install script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.8.0-37-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "generator" "angular"
npm ERR! cwd /home/colin
npm ERR! node -v v0.11.10-pre
npm ERR! npm -v 1.3.15
npm ERR! code ELIFECYCLE
npm http 304 https://registry.npmjs.org/punycode
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/colin/npm-debug.log
npm ERR! not ok code 0
I tried "npm install contextify", and I was met with this:
npm http GET https://registry.npmjs.org/angularnpm
npm http GET https://registry.npmjs.org/install
npm http GET https://registry.npmjs.org/generator
npm http GET https://registry.npmjs.org/contextify
npm http 304 https://registry.npmjs.org/contextify
npm http 304 https://registry.npmjs.org/generator
npm http 404 https://registry.npmjs.org/angularnpm
npm ERR! 404 'angularnpm' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR! System Linux 3.8.0-37-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "generator" "angularnpm" "install" "contextify"
npm ERR! cwd /home/colin
npm ERR! node -v v0.11.10-pre
npm ERR! npm -v 1.3.15
npm ERR! code E404
npm http 200 https://registry.npmjs.org/install
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/colin/npm-debug.log
npm ERR! not ok code 0
I changed the permissions of my local directory with
"sudo chown -R whoami /usr/local/"
I'm thinking this is a permissions or PATH error, but I have no idea what I'm dealing with here.
Could this be because of a Yeoman issue?
It's not
npm install -g generator angular
it's
npm install -g generator-angular
with the dash between generator and angular.
I have seen some tips on the internet on how to create the full directory structure for a node project with a command line with expressJS.
Here are some examples:
express express-skeleton << http://quickleft.com/blog/getting-started-with-express-in-node
./node_modules/.bin/express -t ejs << http://naholyr.fr/2011/08/ecrire-service-rest-nodejs-express-partie-1/
--l << http://www.techrepublic.com/article/build-nodejs-web-applications-with-express/
But none of those work for me. I have install express and update it to have it globally installed with npm update express -g but my terminal doesn't even recognize the command line express.
How can I build a web app skeleton easily with the command line? Thanks a lot
EDIT: when running the npm install -g express command line, I get this error message:
npm http GET https://registry.npmjs.org/express
npm http 200 https://registry.npmjs.org/express
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/express'
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/express']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/express',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/express',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53',
npm ERR! 'Object.oncomplete (fs.js:107:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "express"
npm ERR! cwd /Users/arnauddrizard/Documents/Dev/RestAPI
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /usr/local/lib/node_modules/express
npm ERR! fstream_path /usr/local/lib/node_modules/express
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/express'
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/arnauddrizard/Documents/Dev/RestAPI/npm-debug.log
npm ERR! not ok code 0
npm unable to create folder inside your application folder.
Give sufficient permissons to your folder, I hope that will fix your issue.
What output do you get when you run npm install -g express? The problem is most likely that npm install -g is not installing to somewhere that's in your PATH.