正在运行流星应用程序时收到此错误消息

问题描述 投票:2回答:1
iron-router: updating npm dependencies -- connect...
npm ERR! Error: EACCES, open '/home/john/.npm/connect/2.9.0/package/package.json'
npm ERR!  { [Error: EACCES, open '/home/john/.npm/connect/2.9.0/package/package.json']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/home/john/.npm/connect/2.9.0/package/package.json' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/home/john/.meteor/packages/meteor-tool/.1.0.35.ftql1v++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/bin/node" "/home/john/.meteor/packages/meteor-tool/.1.0.35.ftql1v++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/bin/npm" "install" "[email protected]"
npm ERR! cwd /home/john/.meteorite/packages/iron-router/EventedMind/iron-router/05415a8891ea87a00fb1e2388585f2ca5a38e0da/.npm/package-new-iwgw8d
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /home/john/.npm/connect/2.9.0/package/package.json
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open '/home/john/.npm/connect/2.9.0/package/package.json'
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/john/.meteorite/packages/iron-router/EventedMind/iron-router/05415a8891ea87a00fb1e2388585f2ca5a38e0da/.npm/package-new-iwgw8d/npm-debug.log
npm ERR! not ok code 0

iron-router: updating npm dependencies -- connect...
npm ERR! Error: EACCES, open '/home/john/.npm/connect/2.9.0/package/package.json'
npm ERR!  { [Error: EACCES, open '/home/john/.npm/connect/2.9.0/package/package.json']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/home/john/.npm/connect/2.9.0/package/package.json' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/home/john/.meteor/packages/meteor-tool/.1.0.35.ftql1v++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/bin/node" "/home/john/.meteor/packages/meteor-tool/.1.0.35.ftql1v++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/bin/npm" "install" "[email protected]"
npm ERR! cwd /home/john/.meteorite/packages/iron-router/EventedMind/iron-router/05415a8891ea87a00fb1e2388585f2ca5a38e0da/.npm/package-new-19br3u6
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /home/john/.npm/connect/2.9.0/package/package.json
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open '/home/john/.npm/connect/2.9.0/package/package.json'
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/john/.meteorite/packages/iron-router/EventedMind/iron-router/05415a8891ea87a00fb1e2388585f2ca5a38e0da/.npm/package-new-19br3u6/npm-debug.log
npm ERR! not ok code 0

=> Errors prevented startup:                  

While Building package `iron-router`:
error: couldn't install npm package

While Building package `iron-router`:
error: couldn't install npm package

=> Your application has errors. Waiting for file change.
meteor
1个回答
0
投票

如果您使用用户权限运行初始命令(您的答案尚不清楚,请下次打印该命令),那么它需要能够访问(读取,写入,执行)其他目录相同的权限。

您可以通过以下方式更改所有权:

chown -R $USER <directory>

在您的情况下,<directory>/home/john-R用于递归,因此它也会更改所有子目录,这正是您想要的。

See here for more details

© www.soinside.com 2019 - 2024. All rights reserved.