Understanding error message from Meteor.js: Error: EACCES, permission denied

匿名 (未验证) 提交于 2019-12-03 08:28:06

问题:

My meteor.js application is crashing. I am getting the following error. It appears that the error is not in my application code. I would appreciate if someone could take a look at the following message and let me know how I could get rid of this error.

Error Message

Your application is crashing. Waiting for file change. => Modified -- restarting. => Errors prevented startup: Exception while bundling application: Error: EACCES, permission denied '/Users/username/Dropbox/LearnSoftware_and_Math/LearnJavascript/LearnMeteor/microscope/.meteor/local/build/app/collections/posts.js'     at Object.fs.unlinkSync (fs.js:582:18)     at Object._.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:278:10)     at _.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:274:15)     at Array.forEach (native)     at Function._.each._.forEach (/Users/username/.meteor/tools/275efdf2db/lib/node_modules/underscore/underscore.js:79:11)     at Object._.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:272:9)     at _.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:274:15)     at Array.forEach (native)     at Function._.each._.forEach (/Users/username/.meteor/tools/275efdf2db/lib/node_modules/underscore/underscore.js:79:11)     at Object._.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:272:9)     at _.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:274:15)     at Array.forEach (native)     at Function._.each._.forEach (/Users/username/.meteor/tools/275efdf2db/lib/node_modules/underscore/underscore.js:79:11)     at Object._.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:272:9)     at _.extend.write_to_directory (/Users/username/.meteor/tools/275efdf2db/tools/bundler.js:794:11)     at Object.exports.bundle (/Users/username/.meteor/tools/275efdf2db/tools/bundler.js:873:12)     at /Users/username/.meteor/tools/275efdf2db/tools/run.js:694:26     at exports.inFiber (/Users/username/.meteor/tools/275efdf2db/tools/fiber-helpers.js:24:12) => Your application is crashing. Waiting for file change. 

回答1:

This works for me: re-set the chown permissions of /.meteor/local/build (to avoid use sudo) to your user.

For example, my user is "skozz". In my project folder:

sudo chown -R skozz .meteor/local/build

Then run mrt or meteor

If the problem persists maybe you should set the same permissions to the main .npm folder. In my case:

chown -R skozz ~/.npm 


回答2:

I searched some more on the topic and it appears to be a problem with using sudo to install some packages which meteorite requires. As suggested on this Github issues page one way to solve this is to remove the folder /.meteor/local/build in the application and restart meteor.



回答3:

try

chmod +x /Users/username/Dropbox/LearnSoftware_and_Math/LearnJavascript/LearnMeteor/microscope/.meteor/local/build/app/collections/posts.js 


回答4:

i solved the problem by completely removing purging uninstall ! nodejs and npm with this script 'os x' : sudo rm /usr/local/bin/npm sudo rm /usr/local/share/man/man1/node.1 sudo rm /usr/local/lib/dtrace/node.d sudo rm -rf ~/.npm sudo rm -rf ~/.node-gyp sudo rm /opt/local/bin/node sudo rm /opt/local/include/node sudo rm -rf /opt/local/lib/node_modules sudo rm -rf /usr/local/include/node/

after that i installed nodejs properly with the pkg (i'm on os x) downloaded on the nodejs website and instaled it then all worked fine with meteor update and cd path/to/meteor/project ; meteor



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!