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

4

3

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.
Fattal answered 9/5, 2013 at 2:41 Comment(0)
F
5

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.

Fattal answered 9/5, 2013 at 11:50 Comment(2)
Yes! I had run meteor as root first to get it running. THEN I created a user. Chown won't work for some stupid read. Oh the reason is because meteor will SYMBOLIC LINK a folder, chown won't do the trick. So remove the link and run meteor, which will create a new link. Tada! Thanks OP :)Polonaise
I can't remember ( I'm 51 years old ) what In my entire life gave me more trouble than all this NPM stuff... if it is somehow linked to NPM, then you will be in trouble. Rest in hell all those that created this. I code Java, R, Python, Fotran, Basic, Pascal, Cobol, Javascript, C++, Lua, etc ... but never seen anything so difficult to work fine ... an infinity of trouble and even more different answers to solve each one.Gaspar
E
5

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
Endophyte answered 21/8, 2014 at 14:34 Comment(1)
This will probably work but I had to actually remove itPolonaise
C
0

try

chmod +x /Users/username/Dropbox/LearnSoftware_and_Math/LearnJavascript/LearnMeteor/microscope/.meteor/local/build/app/collections/posts.js
Colourable answered 9/5, 2013 at 2:47 Comment(1)
That did not work. I am getting the same error message even after doing that. Also, that is a file created by meteor...I should not need to change its permission manually.Fattal
A
0

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

Autography answered 26/7, 2016 at 10:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.