pro-react / react-app-boilerplate

React Application Boilerplate
MIT License
154 stars 123 forks source link

Permission denied error on npm start #5

Closed sojharo closed 8 years ago

sojharo commented 8 years ago

I cloned the application and then after installing all the dependencies, I got following error when I tried to run the application using "npm start" command.

react-app-boilerplate@0.1.3 start /media/sojharo/Data/Volumes/DoneOrOld/Misc/code for learning/Reactjs/react-app-boilerplate webpack-dev-server --progress

sh: 1: webpack-dev-server: Permission denied

npm ERR! Linux 3.19.0-56-generic npm ERR! argv "/home/sojharo/.nvm/v4.2.3/bin/node" "/home/sojharo/.nvm/v4.2.3/bin/npm" "start" npm ERR! node v4.2.3 npm ERR! npm v2.14.7 npm ERR! code ELIFECYCLE npm ERR! react-app-boilerplate@0.1.3 start: webpack-dev-server --progress npm ERR! Exit status 126 npm ERR! npm ERR! Failed at the react-app-boilerplate@0.1.3 start script 'webpack-dev-server --progress'. npm ERR! This is most likely a problem with the react-app-boilerplate package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! webpack-dev-server --progress npm ERR! You can get their info via: npm ERR! npm owner ls react-app-boilerplate npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /media/sojharo/Data/Volumes/DoneOrOld/Misc/code for learning/Reactjs/react-app-boilerplate/npm-debug.log

sojharo commented 8 years ago

Here is the log file:

0 info it worked if it ends with ok 1 verbose cli [ '/home/sojharo/.nvm/v4.2.3/bin/node', 1 verbose cli '/home/sojharo/.nvm/v4.2.3/bin/npm', 1 verbose cli 'start' ] 2 info using npm@2.14.7 3 info using node@v4.2.3 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info prestart react-app-boilerplate@0.1.3 6 info start react-app-boilerplate@0.1.3 7 verbose unsafe-perm in lifecycle true 8 info react-app-boilerplate@0.1.3 Failed to exec start script 9 verbose stack Error: react-app-boilerplate@0.1.3 start: webpack-dev-server --progress 9 verbose stack Exit status 126 9 verbose stack at EventEmitter. (/home/sojharo/.nvm/v4.2.3/lib/node_modules/npm/lib/utils/lifecycle.js:214:16) 9 verbose stack at emitTwo (events.js:87:13) 9 verbose stack at EventEmitter.emit (events.js:172:7) 9 verbose stack at ChildProcess. (/home/sojharo/.nvm/v4.2.3/lib/node_modules/npm/lib/utils/spawn.js:24:14) 9 verbose stack at emitTwo (events.js:87:13) 9 verbose stack at ChildProcess.emit (events.js:172:7) 9 verbose stack at maybeClose (internal/child_process.js:818:16) 9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 10 verbose pkgid react-app-boilerplate@0.1.3 11 verbose cwd /media/sojharo/Data/Volumes/DoneOrOld/Misc/code for learning/Reactjs/react-app-boilerplate 12 error Linux 3.19.0-56-generic 13 error argv "/home/sojharo/.nvm/v4.2.3/bin/node" "/home/sojharo/.nvm/v4.2.3/bin/npm" "start" 14 error node v4.2.3 15 error npm v2.14.7 16 error code ELIFECYCLE 17 error react-app-boilerplate@0.1.3 start: webpack-dev-server --progress 17 error Exit status 126 18 error Failed at the react-app-boilerplate@0.1.3 start script 'webpack-dev-server --progress'. 18 error This is most likely a problem with the react-app-boilerplate package, 18 error not with npm itself. 18 error Tell the author that this fails on your system: 18 error webpack-dev-server --progress 18 error You can get their info via: 18 error npm owner ls react-app-boilerplate 18 error There is likely additional logging output above. 19 verbose exit [ 1, true ]

cassiozen commented 8 years ago

Looks like you have a problem in your npm installation. Did all went well with npm install?

cassiozen commented 8 years ago

Hi @sojharo. I'll close this for inactivity, but if you're still having problems please feel free to reopen it.

Rolando-Barbella commented 8 years ago

Hi, I have the same issue, I cloned the repository from my GitHub account, it works on Window, not in Linux

react-redux@1.0.0 start /home/rolando/Documents/Projects/ReactJs-Redux webpack-dev-server

sh: 1: webpack-dev-server: Permission denied

npm ERR! Linux 3.13.0-37-generic npm ERR! argv "/usr/local/bin/node" "/home/rolando/.npm-packages/bin/npm" "start" npm ERR! node v5.8.0 npm ERR! npm v3.8.2 npm ERR! code ELIFECYCLE npm ERR! react-redux@1.0.0 start: webpack-dev-server npm ERR! Exit status 126 npm ERR! npm ERR! Failed at the react-redux@1.0.0 start script 'webpack-dev-server'. 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 package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! webpack-dev-server npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs react-redux npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls react-redux npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/rolando/Documents/Projects/ReactJs-Redux/npm-debug.log

Rolando-Barbella commented 8 years ago

It's weird, I have another repository on the same machine and it does works...

cassiozen commented 8 years ago

Hi @Rolando-Barbella It's really weird. Have you tried installing webpack and webpack-dev-server globally? npm install -g webpack webpack-dev-server

Rolando-Barbella commented 8 years ago

Hi @cassiozen , Thanks for the answer, I pretty much rewrote the webpack-config.js file, deleted the node_modules folder, installed the dependencies again and it works, is something to do with webpack I think

dloret commented 7 years ago

Hi, I got this issue also in this precise configuration:

It could be related to the fact the config (global versus local) installation of some packages is not the same in the 2 environments (windows vs linux). After simply deleting the node_modules folder, without changing the config files, everything was back to normal again.

martin-martin commented 7 years ago

Had the same issue. Simply deleting /node_modules and running npm install again resolved it.

russellsean commented 7 years ago

I get this error a lot using Vagrant, rsync includes /node_modulesif it already exists on the host machine. @martin-martin is correct, delete it from the guest machine and run npm install

R1zZ commented 6 years ago

hy all, i have same issue and i'am try to delete node_modules , clear cache npm ant re install npm but it's not solve,any have idea?? i use template core UI for react js

mclovinxie commented 6 years ago

I have the same issue like this: sh: 1: webpack: Permission denied npm ERR! code ELIFECYCLE npm ERR! errno 126 I solved this problem by chmoding node_modules/.bin/webpack: sudo chmod 777 ./node_modules/.bin/webpack

Here is the link I refer to: https://unix.stackexchange.com/questions/381902/permission-denied-when-we-use-npm-start-using-webpack

R1zZ commented 6 years ago

@tosakyo thanks for your response but your link is not results,any idea? for now i migrate from npm to yarn,so far so good

mclovinxie commented 6 years ago

@tosakyo thanks for your response but your link is not results,any idea? for now i migrate from npm to yarn,so far so good

oops, sorry, here is the right link: https://unix.stackexchange.com/questions/381902/permission-denied-when-we-use-npm-start-using-webpack

btw, i will take into account migrating npm to yarn thanks very much!

R1zZ commented 6 years ago

@tosakyo thanks for your response but your link is not results,any idea? for now i migrate from npm to yarn,so far so good

oops, sorry, here is the right link: https://unix.stackexchange.com/questions/381902/permission-denied-when-we-use-npm-start-using-webpack

btw, i will take into account migrating npm to yarn thanks very much!

ok thanks for response

YanCallier commented 5 years ago

Hi, same issue. What i do : npm init react-app my-app ---> npm start ---> ok npx create-react-app todo-list ---> npm start ---> error ELIFECYCLE

I deleted todo-list, and retry with : npm init react-app my-list ---> npm start ---> error ELIFECYCLE

Did i break something ? my-app is still working

R1zZ commented 5 years ago

Hi, same issue. What i do : npm init react-app my-app ---> npm start ---> ok npx create-react-app todo-list ---> npm start ---> error ELIFECYCLE

I deleted todo-list, and retry with : npm init react-app my-list ---> npm start ---> error ELIFECYCLE

Did i break something ? my-app is still working

in my case i update file scss-->vendor--> _variables.scss i change the line:

@import "node_modules/@coreui/coreui/scss/bootstrap-variables";

to

@import "node_modules/@coreui/coreui/scss/variables";

and than i delete my node_module and run : yarn install yarn start

*i recommend u to using yarn

YanCallier commented 5 years ago

Thanks R1zZ, Yes I solved it when I delete my node_module and run npm install to re-built it. I guess I would see the benefits of yarn in time

ArbestNew commented 5 years ago

Hi @Rolando-Barbella It's really weird. Have you tried installing webpack and webpack-dev-server globally? npm install -g webpack webpack-dev-server

This solved my issue, no other operation needed in my case!

limeandcoconut commented 5 years ago

Not helpful for those of us who aren't planning on npm i -g webpack and other deps though 😕

R1zZ commented 5 years ago

Not helpful for those of us who aren't planning on npm i -g webpack and other deps though

if u have the same problem in the discussion,u just change css style on folder css in react project ..

yashmalik23 commented 4 years ago

All you need to do is delete the node_modules folder and run npm install

epiphanizer commented 4 years ago

chmod recursively helped in my scenario, where npm installing again caused a problem. I ran into this while dealing with an old artifact and pulling its node modules over.

Bheemashankar18 commented 1 year ago

iam having this problem to run my project in browser,please helpmetofix it...

finda1@Finda1s-iMac finda % npm start

finda@0.1.0 start react-scripts start

sh: /Users/finda1/Desktop/finda/node_modules/.bin/react-scripts: Permission denied