nuxt / create-nuxt-app

Create Nuxt.js App in seconds.
MIT License
3.48k stars 430 forks source link

Failed to install packages #441

Closed martixy closed 4 years ago

martixy commented 4 years ago

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

djmin43 commented 3 years ago

I had the exact same issue, and I solved it by changing my node version.

My node version was on 16.1, and switched to the LATEST STABLE version which is (14.17.1).

Always check node -v to make sure your actual node version that's active.

ikhidebright commented 2 years ago

Updating my Node version solved the issue

ekazda commented 2 years ago

This issue is still occurring for me. I'm using an Apple M1 Max laptop (maybe that has something to do with it for me)

I've tried this with yarn, npm and npx and all result in the same issue. I have the LTS version of node.js installed (16.14.2 as of today) and I have updated and cleaned up all of my global npm modules:

corepack@0.10.0
node-gyp@9.0.0
npm@8.5.5

When I run yarn create nuxt-app test-project I end up with the following:


yarn create v1.22.15
warning package.json: No license field
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Installed "create-nuxt-app@4.0.0" with binaries:
      - create-nuxt-app
[#####################################################################] 342/342
create-nuxt-app v4.0.0
✨  Generating Nuxt.js project in test-project
? Project name: test-project
? Programming language: JavaScript
? Package manager: Yarn
? UI framework: Tailwind CSS
? Nuxt.js modules: Axios - Promise based HTTP client, Progressive Web App (PWA),
 Content - Git-based headless CMS
? Linting tools: ESLint, Prettier
? Testing framework: Jest
? Rendering mode: Universal (SSR / SSG)
? Deployment target: Server (Node.js hosting)
? Development tools: jsconfig.json (Recommended for VS Code if you're not using 
typescript)
? Continuous integration: None
? Version control system: Git
warning ../../../package.json: No license field
warning ../../../package.json: No license field
warning ../../../package.json: No license field
warning @nuxt/content > @nuxt/types > @types/webpack > @types/anymatch@3.0.0: Th
is is a stub types definition. anymatch provides its own type definitions, so yo
u do not need this installed.
warning @nuxt/content > @nuxt/types > @types/autoprefixer > @types/browserslist@
4.15.0: This is a stub types definition. browserslist provides its own type defi
nitions, so you do not need this installed.
warning ../../../package.json: No license field
warning @nuxt/content > @nuxt/types > @types/webpack > @types/anymatch@3.0.0: Th
is is a stub types definition. anymatch provides its own type definitions, so yo
u do not need this installed.
warning @nuxt/content > @nuxt/types > @types/autoprefixer > @types/browserslist@
4.15.0: This is a stub types definition. browserslist provides its own type defi
nitions, so you do not need this installed.
warning ../../../package.json: No license field
warning @nuxt/content > @nuxt/types > @types/webpack > @types/anymatch@3.0.0: Th
is is a stub types definition. anymatch provides its own type definitions, so yo
u do not need this installed.
warning @nuxt/content > @nuxt/types > @types/autoprefixer > @types/browserslist@
4.15.0: This is a stub types definition. browserslist provides its own type defi
nitions, so you do not need this installed.
warning @nuxtjs/pwa > jimp-compact@0.16.2: wrong release
warning nuxt > @nuxt/babel-preset-app > core-js@2.6.12: core-js@<3.4 is no longe
r maintained and not recommended for usage due to the number of issues. Because 
of the V8 engine whims, feature detection in old core-js versions could cause a 
slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependen
cies to the actual version of core-js.
warning ../../../package.json: No license field
warning @nuxt/content > @nuxt/types > @types/webpack > @types/anymatch@3.0.0: Th
is is a stub types definition. anymatch provides its own type definitions, so yo
u do not need this installed.
warning @nuxt/content > @nuxt/types > @types/autoprefixer > @types/browserslist@
4.15.0: This is a stub types definition. browserslist provides its own type defi
nitions, so you do not need this installed.
warning @nuxtjs/pwa > jimp-compact@0.16.2: wrong release
warning nuxt > @nuxt/babel-preset-app > core-js@2.6.12: core-js@<3.4 is no longe
r maintained and not recommended for usage due to the number of issues. Because 
of the V8 engine whims, feature detection in old core-js versions could cause a 
slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependen
cies to the actual version of core-js.
warning ../../../package.json: No license field
warning @nuxt/content > @nuxt/types > @types/webpack > @types/anymatch@3.0.0: Th
is is a stub types definition. anymatch provides its own type definitions, so yo
u do not need this installed.
warning @nuxt/content > @nuxt/types > @types/autoprefixer > @types/browserslist@
4.15.0: This is a stub types definition. browserslist provides its own type defi
nitions, so you do not need this installed.
warning @nuxtjs/pwa > jimp-compact@0.16.2: wrong release
warning nuxt > @nuxt/babel-preset-app > core-js@2.6.12: core-js@<3.4 is no longe
r maintained and not recommended for usage due to the number of issues. Because 
of the V8 engine whims, feature detection in old core-js versions could cause a 
slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependen
cies to the actual version of core-js.
warning nuxt > @nuxt/webpack > webpack-hot-middleware > querystring@0.2.1: The q
warning ../../../package.json: No license field
warning @nuxt/content > @nuxt/types > @types/webpack > @types/anymatch@3.0.0: Th
is is a stub types definition. anymatch provides its own type definitions, so yo
u do not need this installed.
warning @nuxt/content > @nuxt/types > @types/autoprefixer > @types/browserslist@
4.15.0: This is a stub types definition. browserslist provides its own type defi
nitions, so you do not need this installed.
warning @nuxtjs/pwa > jimp-compact@0.16.2: wrong release
warning nuxt > @nuxt/babel-preset-app > core-js@2.6.12: core-js@<3.4 is no longe
r maintained and not recommended for usage due to the number of issues. Because 
of the V8 engine whims, feature detection in old core-js versions could cause a 
slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependen
cies to the actual version of core-js.
warning nuxt > @nuxt/webpack > webpack-hot-middleware > querystring@0.2.1: The q
uerystring API is considered Legacy. new code should use the URLSearchParams API
 instead.
warning nuxt > @nuxt/webpack > webpack > node-libs-browser > url > querystring@0
.2.0: The querystring API is considered Legacy. new code should use the URLSearc
hParams API instead.
warning nuxt > @nuxt/webpack > webpack > watchpack > watchpack-chokidar2 > choki
dar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to c
hokidar 3 with 15x fewer dependencies
warning nuxt > @nuxt/webpack > webpack > watchpack > watchpack-chokidar2 > choki
dar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using ins
ecure binaries. Upgrade to fsevents 2.
warning nuxt > @nuxt/webpack > webpack > micromatch > snapdragon > source-map-re
solve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
warning nuxt > @nuxt/webpack > cssnano > cssnano-preset-default > postcss-svgo >
 svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
warning nuxt > @nuxt/webpack > postcss-preset-env > postcss-color-functional-not
ation > postcss-values-parser > flatten@1.0.3: flatten is deprecated in favor of
 utility frameworks such as lodash.
warning nuxt > @nuxt/webpack > webpack > micromatch > snapdragon > source-map-re
solve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#depre
cated
warning nuxt > @nuxt/webpack > webpack > micromatch > snapdragon > source-map-re
solve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning nuxt > @nuxt/webpack > webpack > micromatch > snapdragon > source-map-re
solve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning ../../../package.json: No license field
warning @nuxt/content > @nuxt/types > @types/webpack > @types/anymatch@3.0.0: Th
is is a stub types definition. anymatch provides its own type definitions, so yo
u do not need this installed.
warning @nuxt/content > @nuxt/types > @types/autoprefixer > @types/browserslist@
4.15.0: This is a stub types definition. browserslist provides its own type defi
nitions, so you do not need this installed.
warning @nuxtjs/pwa > jimp-compact@0.16.2: wrong release
warning nuxt > @nuxt/babel-preset-app > core-js@2.6.12: core-js@<3.4 is no longe
r maintained and not recommended for usage due to the number of issues. Because 
of the V8 engine whims, feature detection in old core-js versions could cause a 
slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependen
cies to the actual version of core-js.
warning nuxt > @nuxt/webpack > webpack-hot-middleware > querystring@0.2.1: The q
uerystring API is considered Legacy. new code should use the URLSearchParams API
 instead.
warning nuxt > @nuxt/webpack > webpack > node-libs-browser > url > querystring@0
.2.0: The querystring API is considered Legacy. new code should use the URLSearc
hParams API instead.
warning nuxt > @nuxt/webpack > webpack > watchpack > watchpack-chokidar2 > choki
dar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to c
hokidar 3 with 15x fewer dependencies
warning nuxt > @nuxt/webpack > webpack > watchpack > watchpack-chokidar2 > choki
dar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using ins
ecure binaries. Upgrade to fsevents 2.
warning nuxt > @nuxt/webpack > webpack > micromatch > snapdragon > source-map-re
solve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
warning nuxt > @nuxt/webpack > cssnano > cssnano-preset-default > postcss-svgo >
 svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
warning nuxt > @nuxt/webpack > postcss-preset-env > postcss-color-functional-not
ation > postcss-values-parser > flatten@1.0.3: flatten is deprecated in favor of
 utility frameworks such as lodash.
warning nuxt > @nuxt/webpack > webpack > micromatch > snapdragon > source-map-re
solve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#depre
cated
warning nuxt > @nuxt/webpack > webpack > micromatch > snapdragon > source-map-re
solve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning nuxt > @nuxt/webpack > webpack > micromatch > snapdragon > source-map-re
solve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning ../../../package.json: No license field
warning @nuxt/content > @nuxt/types > @types/webpack > @types/anymatch@3.0.0: Th
is is a stub types definition. anymatch provides its own type definitions, so yo
u do not need this installed.
warning @nuxt/content > @nuxt/types > @types/autoprefixer > @types/browserslist@
4.15.0: This is a stub types definition. browserslist provides its own type defi
nitions, so you do not need this installed.
warning @nuxtjs/pwa > jimp-compact@0.16.2: wrong release
warning nuxt > @nuxt/babel-preset-app > core-js@2.6.12: core-js@<3.4 is no longe
r maintained and not recommended for usage due to the number of issues. Because 
of the V8 engine whims, feature detection in old core-js versions could cause a 
slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependen
cies to the actual version of core-js.
warning nuxt > @nuxt/webpack > webpack-hot-middleware > querystring@0.2.1: The q
uerystring API is considered Legacy. new code should use the URLSearchParams API
 instead.
warning nuxt > @nuxt/webpack > webpack > node-libs-browser > url > querystring@0
.2.0: The querystring API is considered Legacy. new code should use the URLSearc
hParams API instead.
warning nuxt > @nuxt/webpack > webpack > watchpack > watchpack-chokidar2 > choki
dar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to c
hokidar 3 with 15x fewer dependencies
warning nuxt > @nuxt/webpack > webpack > watchpack > watchpack-chokidar2 > choki
dar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using ins
ecure binaries. Upgrade to fsevents 2.
warning nuxt > @nuxt/webpack > webpack > micromatch > snapdragon > source-map-re
solve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
warning nuxt > @nuxt/webpack > cssnano > cssnano-preset-default > postcss-svgo >
 svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
warning nuxt > @nuxt/webpack > postcss-preset-env > postcss-color-functional-not
ation > postcss-values-parser > flatten@1.0.3: flatten is deprecated in favor of
 utility frameworks such as lodash.
warning nuxt > @nuxt/webpack > webpack > micromatch > snapdragon > source-map-re
solve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#depre
cated
warning nuxt > @nuxt/webpack > webpack > micromatch > snapdragon > source-map-re
solve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning nuxt > @nuxt/webpack > webpack > micromatch > snapdragon > source-map-re
solve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning vue-jest > babel-plugin-transform-es2015-modules-commonjs > babel-runtim
e > core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for
 usage due to the number of issues. Because of the V8 engine whims, feature dete
ction in old core-js versions could cause a slowdown up to 100x even if nothing 
is polyfilled. Please, upgrade your dependencies to the actual version of core-j
s.
warning vue-jest > extract-from-css > css > source-map-resolve@0.5.3: See https:
//github.com/lydell/source-map-resolve#deprecated
warning vue-jest > extract-from-css > css > urix@0.1.0: Please see https://githu
b.com/lydell/urix#deprecated
warning "nuxt > @nuxt/components@2.2.1" has unmet peer dependency "consola@*".
warning " > @babel/eslint-parser@7.17.0" has unmet peer dependency "@babel/core@
>=7.11.0".
warning "@nuxtjs/eslint-config > eslint-plugin-promise@5.2.0" has incorrect peer
 dependency "eslint@^7.0.0".
warning "@nuxtjs/eslint-config > eslint-config-standard@16.0.3" has incorrect pe
er dependency "eslint@^7.12.1".
warning "@nuxtjs/eslint-config > eslint-plugin-jest > @typescript-eslint/experim
ental-utils > @typescript-eslint/utils > @typescript-eslint/typescript-estree > 
tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev ||
 >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta |
| >= 3.7.0-dev || >= 3.7.0-beta".
warning " > babel-core@7.0.0-bridge.0" has unmet peer dependency "@babel/core@^7
.0.0-0".
warning " > babel-jest@27.5.1" has unmet peer dependency "@babel/core@^7.8.0".
warning "babel-jest > babel-preset-jest@27.5.1" has unmet peer dependency "@babe
l/core@^7.0.0".
warning "babel-jest > babel-preset-jest > babel-preset-current-node-syntax@1.0.1
" has unmet peer dependency "@babel/core@^7.0.0".
warning "babel-jest > babel-preset-jest > babel-preset-current-node-syntax > @ba
bel/plugin-syntax-import-meta@7.10.4" has unmet peer dependency "@babel/core@^7.
0.0-0".
warning "babel-jest > babel-preset-jest > babel-preset-current-node-syntax > @ba
bel/plugin-syntax-bigint@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0"
.
error /Users/quantumdynamix/QD Shares/Git Shares/test-project/node_modules/deasy
nc: Command failed.
Exit code: 1
Command: node ./build.js
Arguments: 
Directory: /Users/quantumdynamix/QD Shares/Git Shares/test-project/node_modules/
deasync
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@9.0.0
gyp info using node@16.14.2 | darwin | arm64
gyp info find Python using Python version 3.8.9 found at "/Library/Developer/Com
mandLineTools/usr/bin/python3"
gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp
/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/quantumdynamix/QD Shares/Git Shares/test-project/n
ode_modules/deasync/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/add
on.gypi',
gyp info spawn args   '-I',
gyp info spawn args   
'/Users/quantumdynamix/Library/Caches/node-gyp/16.14.2/include/node/common.gypi'
,
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/quantumdynamix/Library/Caches/node
-gyp/16.14.2',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modul
es/node-gyp',
gyp info spawn args   
'-Dnode_lib_file=/Users/quantumdynamix/Library/Caches/node-gyp/16.14.2/<(target_
arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/quantumdynamix/QD Shares/Git Sha
res/test-project/node_modules/deasync',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
   CXX(target) Release/obj.target/deasync/src/deasync.o
clang: error: no such file or directory: 'Shares/Git'
clang: error: no such file or directory: 'Shares/test-project/node_modules/node-
addon-api'
make: *** [Release/obj.target/deasync/src/deasync.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_
modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:526:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_p
rocess:291:12)
gyp ERR! System Darwin 21.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_mod
ules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/quantumdynamix/QD Shares/Git Shares/test-project/node_module
s/deasync
gyp ERR! node -v v16.14.2
gyp ERR! node-gyp -v v9.0.0
gyp ERR! not ok 
Build failed

yarn install v1.22.15
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this 
command.

/Users/quantumdynamix/.config/yarn/global/node_modules/sao/lib/installPackages.js:108
        throw new SAOError(`Failed to install ${packageName} in ${cwd}`)
        ^

SAOError: Failed to install packages in /Users/quantumdynamix/QD Shares/Git Shares/test-project
    at ChildProcess.<anonymous> (/Users/quantumdynamix/.config/yarn/global/node_modules/sao/lib/installPackages.js:108:15)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
  __sao: true
}
error Command failed.
Exit code: 1
Command: /usr/local/bin/create-nuxt-app
Arguments: test-project
Directory: /Users/quantumdynamix/QD Shares/Git Shares
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.```