create-nuxt-app: Failed to install packages
Wanted to try nuxt. Ran yarn create nuxt-app nuxt-test.
It did some stuff, and actually created the directory with some stuff in there, but then spit out the following error:
C:\Users\martixy\AppData\Local\Yarn\Data\global\node_modules\sao\lib\installPackages.js:108
throw new SAOError(`Failed to install ${packageName} in ${cwd}`)
^
SAOError: Failed to install packages in C:\Web\Projects\nuxt-test
at ChildProcess.<anonymous> (C:\Users\martixy\AppData\Local\Yarn\Data\global\node_modules\sao\lib\installPackages.js:108:15)
at ChildProcess.emit (events.js:321:20)
at ChildProcess.cp.emit (C:\Users\martixy\AppData\Local\Yarn\Data\global\node_modules\sao\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (internal/child_process.js:1026:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) {
__sao: true
}
error Command failed.
Exit code: 1
Environment:
Win10
Node v13.8.0
yarn v1.22.0
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 6
- Comments: 53 (10 by maintainers)
The same problem.
sudo apt-get install g++ build-essentialBefore create project is work for me.After your comment, I deleted my npm cache using
npm cache clean --force. Then things worked. Thanks a lot!!. Sorry for wasting your time on my machine specific issue.@shivgarg5676 I understood you point, since I can’t reproduce in my local, so the issue may be related to some local os or lib installations, I’m just asking if @egoist has any idea or experience about this issue.
BTW, @nuxt/core-team could you try to reproduce this issue in your env ?
upgrade node and yarn to latest versions
yarn create nuxt-app <your-project-name>
Simple but worked for me 😃
Updating my Node version solved the issue
I solved by installing new version of node.js application. Everything works now
@overbid Any Update on the issue ?? I couldn’t fix on my machine. Seems like it’s a vuetify issue. I tried to install Vuetify separately and failed.
Hi I have the same issue on WSL Ubuntu LTS, node v12.16.2, npm v6.14.4, below was my choices and the errors I get,
anas@DESKTOP-VENR4M1:~$ npx create-nuxt-app test-nuxt
create-nuxt-app v2.15.0 ✨ Generating Nuxt.js project in test-nuxt ? Project name test-nuxt ? Project description My posh Nuxt.js project ? Author name Anas ? Choose programming language JavaScript ? Choose the package manager Npm ? Choose UI framework Vuetify.js ? Choose custom server framework None (Recommended) ? Choose Nuxt.js modules (Press <space> to select, to toggle all, to invert selection) ? Choose linting tools ESLint, Prettier ? Choose test framework None ? Choose rendering mode Single Page App ? Choose development tools jsconfig.json (Recommended for VS Code) npm WARN deprecated core-js@2.6.11: core-js@❤️ is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. npm ERR! Unexpected end of JSON input while parsing near ‘…jdBkOYpTVM3Y085qWei\n’
npm ERR! A complete log of this run can be found in: npm ERR! /home/anas/.npm/_logs/2020-04-24T11_38_37_366Z-debug.log
/home/anas/.npm/_npx/4182/lib/node_modules/create-nuxt-app/node_modules/sao/lib/installPackages.js:108 throw new SAOError(
Failed to install ${packageName} in ${cwd}) ^SAOError: Failed to install packages in /home/anas/test-nuxt at ChildProcess.<anonymous> (/home/anas/.npm/_npx/4182/lib/node_modules/create-nuxt-app/node_modules/sao/lib/installPackages.js:108:15) at ChildProcess.emit (events.js:310:20) at maybeClose (internal/child_process.js:1021:16) at Socket.<anonymous> (internal/child_process.js:443:11) at Socket.emit (events.js:310:20) at Pipe.<anonymous> (net.js:672:12) { __sao: true }
Yea, it seems like related to Sao js, but nuxt should take care of this thing as well. At least it should make sure if a user is using everything latest things should work smoothly.
I have the same issue here. @overbid what is sudo apt-get install g++ build-essential going to do?
Cheers, S