next.js: Error: spawn EACCES while following setup instructions for 3.0.0-beta12
Note from maintainers
The temporary fix is to run chmod -R u+x node_modules/next/dist/bin thank you very much @jedrichards for surfacing this.
Please see https://github.com/zeit/next.js/issues/2228#issuecomment-307593716 for more information.
Original issue
nvm use lts/boron
Now using node v6.11.0 (npm v3.10.10)
mkdir test
cd test
npm init --yes
npm install next@beta react react-dom --save
# Added dev/build/start scripts to package.json
# Added pages/index.js with basic contents
npm run dev
> test@1.0.0 dev /Users/jed/work/test
> next
internal/child_process.js:319
throw errnoException(err, 'spawn');
^
Error: spawn EACCES
at exports._errnoException (util.js:1018:11)
at ChildProcess.spawn (internal/child_process.js:319:11)
at Object.exports.spawn (child_process.js:378:9)
at spawn (/Users/jed/work/test/node_modules/cross-spawn/index.js:17:18)
at startProcess (/Users/jed/work/test/node_modules/next/dist/bin/next:69:36)
at Object.<anonymous> (/Users/jed/work/test/node_modules/next/dist/bin/next:90:12)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 4
- Comments: 18 (4 by maintainers)
Yeah, I just did it in the root. It recursively sets all files to be executable by the user in the current directory. I guess you wouldn’t want to do that on a proper project though …
Maybe just do the files in the
bindirectory and see if that works?Just to be clear, it sounds like the original problem was a packaging issue that was fixed. The current problem is a bug specific to npm@5.4.0: https://github.com/npm/npm/issues/18324
Also had the same issue with version 3.2.1 and the
chmodcommand resolved it.Published a new version:
next@3.0.0-beta13.This issue arise because I shipped
next@3.0.0-beta12on windows. I didn’t get the issue because I am using yarn. Anyway, I hope now everything works well.I follow the tutorial and I had this issue… A quick search for
NextJS Error: spawn EACCESpointed out this issue.The
chmodcmd fix it but there is still a problem if we follow the setup.That worked! Thanks for your help!
Found this, going to give it a try when I pluck up the courage. Not 100% confident with modifying file permissions.