嘿伙计们,我在安装MEANStack-Server时出现问题....
只需在digitalocean上设置一个新的linux机器,然后继续安装堆栈。在/ opt /中的npm安装期间,所有内容都开始变得不合适。
安装被杀死了:
/opt/mean$ sudo npm install
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
Killed ....] / extract:socket.io: sill doParallel extract 833
even minimatch 3.0.2 is installed:
/opt/mean$ npm -v minimatch
3.10.9
无论如何,执行npm start会出现:
/opt/mean$ npm start
> meanjs@0.5.0 start /opt/mean
> gulp
module.js:327
throw err;
^
Error: Cannot find module 'process-nextick-args'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/opt/mean/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js:21:23)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
npm ERR! Linux 4.4.0-45-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v4.6.1
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! meanjs@0.5.0 start: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the meanjs@0.5.0 start script 'gulp'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the meanjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs meanjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls meanjs
npm ERR! There is likely additional logging output above.
npm ERR! Linux 4.4.0-45-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v4.6.1
npm ERR! npm v3.10.9
npm ERR! path npm-debug.log.2338324848
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall open
npm ERR! Error: EACCES: permission denied, open 'npm-debug.log.2338324848'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, open 'npm-debug.log.2338324848']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'open',
npm ERR! path: 'npm-debug.log.2338324848' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /opt/mean/npm-debug.log
你们中的任何人都知道错误或者如何继续找到真正的错误?
最佳法比安
答案 0 :(得分:1)
NPM升级后我遇到了这个问题。我设法解决了它:
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
来源:https://docs.npmjs.com/getting-started/fixing-npm-permissions
答案 1 :(得分:0)
我遇到了这样的错误。
试试这个:npm update
然后npm install npm -g