Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-scripts: Permission denied #5773

Closed
giusecagliari opened this issue Nov 11, 2018 · 6 comments
Closed

react-scripts: Permission denied #5773

giusecagliari opened this issue Nov 11, 2018 · 6 comments
Labels

Comments

@giusecagliari
Copy link

Hello I've tried all your option but still have the same problem:

$ sudo yarn start
yarn run v1.12.3
$ react-scripts start
/bin/sh: 1: react-scripts: Permission denied
error Command failed with exit code 126.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command

@giusecagliari giusecagliari changed the title not work react-scripts: Permission denied Nov 11, 2018
@Timer
Copy link
Contributor

Timer commented Nov 12, 2018

Why are you running yarn start with sudo?

@giusecagliari
Copy link
Author

Becouse I guess that permission denied was for using administrator grants, but it's the same, using Sudo, using npm. The error is the same.

@giusecagliari
Copy link
Author

here is the full log.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@6.4.1
3 info using node@v11.0.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle my-app@0.1.0prestart: my-app@0.1.0
6 info lifecycle my-app@0.1.0
start: my-app@0.1.0
7 verbose lifecycle my-app@0.1.0start: unsafe-perm in lifecycle true
8 verbose lifecycle my-app@0.1.0
start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/public/my-app/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
9 verbose lifecycle my-app@0.1.0start: CWD: /var/www/public/my-app
10 silly lifecycle my-app@0.1.0
start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle my-app@0.1.0start: Returned: code: 126 signal: null
12 info lifecycle my-app@0.1.0
start: Failed to exec start script
13 verbose stack Error: my-app@0.1.0 start: react-scripts start
13 verbose stack Exit status 126
13 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid my-app@0.1.0
15 verbose cwd /var/www/public/my-app
16 verbose Linux 3.13.0-55-generic
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v11.0.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 126
22 error my-app@0.1.0 start: react-scripts start
22 error Exit status 126
23 error Failed at the my-app@0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 126, true ]

@remon
Copy link

remon commented Dec 6, 2018

try this command

 chmod +x node_modules/.bin/react-scripts

@giusecagliari

@stale
Copy link

stale bot commented Jan 6, 2019

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Jan 6, 2019
@stale
Copy link

stale bot commented Jan 12, 2019

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

@stale stale bot closed this as completed Jan 12, 2019
@lock lock bot locked and limited conversation to collaborators Jan 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants