所以我从node.org网站v4.4.4下载了节点,我的桌面上有一个文件夹叫做项目我已经进入项目并完成了一个npm install socket.io
它安装好,但我注意到我没有在我的项目文件夹中获得node_modul。但在Users / Rob / node_module和socket.io中有
我错过了什么,或做错了什么?
每当我运行npm安装时,请说gulp我得到
Robs-MBP:chat Rob$ npm install gulp
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "gulp"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! path /Users/Rob/node_modules/.bin/gulp
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall unlink
npm ERR! Error: EACCES: permission denied, unlink '/Users/Rob/node_modules/.bin/gulp'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, unlink '/Users/Rob/node_modules/.bin/gulp']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'unlink',
npm ERR! path: '/Users/Rob/node_modules/.bin/gulp' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES: permission denied, unlink '/Users/Rob/node_modules/.bin/gulp'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EACCES: permission denied, unlink '/Users/Rob/node_modules/.bin/gulp']
npm ERR! error rolling back errno: -13,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back syscall: 'unlink',
npm ERR! error rolling back path: '/Users/Rob/node_modules/.bin/gulp' }
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Rob/Desktop/chat/npm-debug.log
Robs-MBP:chat Rob$ cd
Robs-MBP:~ Rob$ cd Desktop/web
Robs-MBP:web Rob$ npm install gulp
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "gulp"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! path /Users/Rob/node_modules/.bin/gulp
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall unlink
npm ERR! Error: EACCES: permission denied, unlink '/Users/Rob/node_modules/.bin/gulp'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, unlink '/Users/Rob/node_modules/.bin/gulp']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'unlink',
npm ERR! path: '/Users/Rob/node_modules/.bin/gulp' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES: permission denied, unlink '/Users/Rob/node_modules/.bin/gulp'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EACCES: permission denied, unlink '/Users/Rob/node_modules/.bin/gulp']
npm ERR! error rolling back errno: -13,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back syscall: 'unlink',
npm ERR! error rolling back path: '/Users/Rob/node_modules/.bin/gulp' }
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Rob/Desktop/web/npm-debug.log
Robs-MBP:web Rob$ sudo npm install gulp
Password:
npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
gulp@3.9.1 ../../node_modules/gulp
├── interpret@1.0.1
├── pretty-hrtime@1.0.2
├── deprecated@0.0.1
├── archy@1.0.0
├── tildify@1.2.0 (os-homedir@1.0.1)
├── minimist@1.2.0
├── v8flags@2.0.11 (user-home@1.1.1)
├── semver@4.3.6
├── chalk@1.1.3 (escape-string-regexp@1.0.5, supports-color@2.0.0, ansi-styles@2.2.1, has-ansi@2.0.0, strip-ansi@3.0.1)
├── orchestrator@0.3.7 (stream-consume@0.1.0, sequencify@0.0.7, end-of-stream@0.1.5)
├── liftoff@2.2.1 (extend@2.0.1, rechoir@0.6.2, flagged-respawn@0.3.2, findup-sync@0.3.0, resolve@1.1.7)
├── vinyl-fs@0.3.14 (graceful-fs@3.0.8, strip-bom@1.0.0, defaults@1.0.3, vinyl@0.4.6, through2@0.6.5, mkdirp@0.5.1, glob-stream@3.1.18, glob-watcher@0.0.6)
└── gulp-util@3.0.7 (array-differ@1.0.0, array-uniq@1.0.2, lodash._reinterpolate@3.0.0, lodash._reevaluate@3.0.0, beeper@1.1.0, lodash._reescape@3.0.0, object-assign@3.0.0, replace-ext@0.0.1, has-gulplog@0.1.0, fancy-log@1.2.0, vinyl@0.5.3, gulplog@1.0.0, lodash.template@3.6.2, through2@2.0.1, multipipe@0.1.2, dateformat@1.0.12)
然后我甚至尝试了sudo npm install,它仍然不会把node_module文件夹放在我所在的那个文件夹中。而是将它安装在我的Users / Rob / node_module的node_module文件夹中我不明白为什么
解决这个问题的任何帮助都会很棒。