React,node.js:错误:使用npm run dev生成EACCES

时间:2019-05-31 21:52:45

标签: node.js npm permissions

运行脚本“ npm run dev”时,出现“错误:生成EACCES”

完整的NPM日志在这里:

0 info it worked if it ends with ok
1 verbose cli [ '/Users/gorgeg/.nvm/versions/node/v8.8.1/bin/node',
1 verbose cli   '/Users/gorgeg/.nvm/versions/node/v8.8.1/bin/npm',
1 verbose cli   'run',
1 verbose cli   'dev' ]
2 info using npm@5.4.2
3 info using node@v8.8.1
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle griffin_api@1.0.0~predev: griffin_api@1.0.0
6 info lifecycle griffin_api@1.0.0~dev: griffin_api@1.0.0
7 verbose lifecycle griffin_api@1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle griffin_api@1.0.0~dev: PATH: /Users/gorgeg/.nvm/versions/node/v8.8.1/lib/node_modules/npm/bin/node-gyp-bin:/Users/gorgeg/Documents/GitHub/API/node_modules/.bin:/Users/gorgeg/.nvm/versions/node/v8.8.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle griffin_api@1.0.0~dev: CWD: /Users/gorgeg/Documents/GitHub/API
10 silly lifecycle griffin_api@1.0.0~dev: Args: [ '-c',
10 silly lifecycle   'env-cmd ./dev.env nodemon js,graphql -x node --inspect src/index.js' ]
11 silly lifecycle griffin_api@1.0.0~dev: Returned: code: 1  signal: null
12 info lifecycle griffin_api@1.0.0~dev: Failed to exec dev script
13 verbose stack Error: griffin_api@1.0.0 dev: `env-cmd ./dev.env nodemon js,graphql -x node --inspect src/index.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/Users/gorgeg/.nvm/versions/node/v8.8.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at EventEmitter.emit (events.js:213:7)
13 verbose stack     at ChildProcess.<anonymous> (/Users/gorgeg/.nvm/versions/node/v8.8.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at ChildProcess.emit (events.js:213:7)
13 verbose stack     at maybeClose (internal/child_process.js:927:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid griffin_api@1.0.0
15 verbose cwd /Users/gorgeg/Documents/GitHub/API
16 verbose Darwin 18.6.0
17 verbose argv "/Users/gorgeg/.nvm/versions/node/v8.8.1/bin/node" "/Users/gorgeg/.nvm/versions/node/v8.8.1/bin/npm" "run" "dev"
18 verbose node v8.8.1
19 verbose npm  v5.4.2
20 error code ELIFECYCLE
21 error errno 1
22 error griffin_api@1.0.0 dev: `env-cmd ./dev.env nodemon js,graphql -x node --inspect src/index.js`
22 error Exit status 1
23 error Failed at the griffin_api@1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

有人有什么想法吗?

  • 我尝试重新安装Node.js / NPM
  • 我用NVM尝试了3种不同的Node.js版本
  • 我已确保我拥有所需目录中所有文件和文件夹的权限
  • 我什至已经重新安装了Mac OS,看能不能解决问题,但是没有运气。

奖金信息:我的开发脚本运行了好几个月了。

0 个答案:

没有答案