react-redux-starter-kit icon indicating copy to clipboard operation
react-redux-starter-kit copied to clipboard

better-npm-run: Permission denied

Open CatVas opened this issue 9 years ago • 6 comments

My OS is Ubuntu 14.04 LTS. I have got an error when trying to run "sudo npm start". Here is the screenshot: http://joxi.net/krDxLR0S0n5VGr

It says "better-npm-run: Permission denied". Some failure with "better-npm-run start" script. code ELIFECYCLE, exit status 126.

Please help, how to solve it?

CatVas avatar Jun 28 '16 16:06 CatVas

I was getting a similar (but not quite the same) error a few days ago in a fresh ubuntu VM, but I found the steps at this link helpful for general permissions problems w/ npm install/npm start:

https://docs.npmjs.com/getting-started/fixing-npm-permissions

Once I fixed my permissions, I didn't have to rely on sudo anymore (which i'm told is a bad habit w/ npm)

brandonmp avatar Jul 01 '16 21:07 brandonmp

Totally correct @brandonmp, you should never have to use sudo with npm. @CatVas hopefully @brandonmp 's answer can help you out.

dvdzkwsk avatar Jul 01 '16 22:07 dvdzkwsk

I'm seeing this issue, too, also on Ubuntu.

`npm start

[email protected] start /home/ubuntu/workspace better-npm-run start

running better-npm-run in /home/ubuntu/workspace Executing script: start

to be executed: babel-node bin/server /home/ubuntu/workspace/node_modules/babel-core/lib/transformation/plugin.js:138 throw new Error(messages.get("pluginInvalidProperty", loc, i, key)); ^

Error: Plugin 0 specified in "/home/ubuntu/workspace/.babelrc" provided an invalid property of "wrapped" at Plugin.init (/home/ubuntu/workspace/node_modules/babel-core/lib/transformation/plugin.js:138:13) at Function.normalisePlugin (/home/ubuntu/workspace/node_modules/babel-core/lib/transformation/file/options/option-manager.js:174:12) at /home/ubuntu/workspace/node_modules/babel-core/lib/transformation/file/options/option-manager.js:208:30 at Array.map (native) at Function.normalisePlugins (/home/ubuntu/workspace/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:20) at OptionManager.mergeOptions (/home/ubuntu/workspace/node_modules/babel-core/lib/transformation/file/options/option-manager.js:300:36) at OptionManager.addConfig (/home/ubuntu/workspace/node_modules/babel-core/lib/transformation/file/options/option-manager.js:232:10) at OptionManager.findConfigs (/home/ubuntu/workspace/node_modules/babel-core/lib/transformation/file/options/option-manager.js:436:16) at OptionManager.init (/home/ubuntu/workspace/node_modules/babel-core/lib/transformation/file/options/option-manager.js:484:12) at compile (/home/ubuntu/workspace/node_modules/babel-register/lib/node.js:112:69)

npm ERR! Linux 4.2.0-c9 npm ERR! argv "/home/ubuntu/.nvm/versions/node/v4.4.5/bin/node" "/home/ubuntu/.nvm/versions/node/v4.4.5/bin/npm" "start" npm ERR! node v4.4.5 npm ERR! npm v3.10.3 npm ERR! code ELIFECYCLE npm ERR! [email protected] start: better-npm-run start npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script 'better-npm-run start'. 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 react-redux-starter-kit package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! better-npm-run start npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs react-redux-starter-kit npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls react-redux-starter-kit npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/ubuntu/workspace/npm-debug.log`

xeno avatar Jul 04 '16 10:07 xeno

What is this file /home/ubuntu/workspace/.babelrc? If you have babel configs in parent directories to your project, things are not going to work well.

dvdzkwsk avatar Jul 04 '16 13:07 dvdzkwsk

Thank you guys. I did the "Option 1" steps from https://docs.npmjs.com/getting-started/fixing-npm-permissions, but the problem is still the same:

`[email protected] start /media/catvas/Work/DiskE-Job/!jobbing/WebDev/ReactJS/react-redux-starter-kit

better-npm-run start

sh: 1: better-npm-run: Permission denied

npm ERR! Linux 4.2.0-41-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" npm ERR! node v6.2.0 npm ERR! npm v3.9.2 npm ERR! code ELIFECYCLE npm ERR! [email protected] start: better-npm-run start npm ERR! Exit status 126 npm ERR! npm ERR! Failed at the [email protected] start script 'better-npm-run start'. 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 react-redux-starter-kit package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! better-npm-run start npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs react-redux-starter-kit npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls react-redux-starter-kit npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /media/catvas/Work/DiskE-Job/!jobbing/WebDev/ReactJS/react-redux-starter-kit/npm-debug.log`

I discovered a string: npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" - maybe this is where the problem is? The permissions are: -rwxr-xr-x 1 catvas root 27459658 тра 25 19:40 node - for /node folder lrwxrwxrwx 1 catvas root 38 тра 25 19:40 npm - for /npm folder.

CatVas avatar Jul 04 '16 16:07 CatVas

Even I am facing a similar issue with better-npm-run. I tried the below solutions. That didnt help: https://docs.npmjs.com/getting-started/fixing-npm-permissions

ules/.bin/better-npm-run: Permission denied [build-web-dev ] [build-web-dark-dev] npm ERR! code ELIFECYCLE [build-web-dev ] [build-web-dark-dev] npm ERR! errno 126

avinashrd avatar Feb 05 '18 06:02 avinashrd