cli
cli copied to clipboard
Error creating nextjs app@latest
`Windows_NT 10.0.19044 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Legitxl\node_modules\npm\bin\npm-cli.js" "install" npm ERR! node v20.11.0 npm ERR! npm v2.15.12
npm ERR! Unsupported URL Type: npm:wrap-ansi@^7.0.0 npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! https://github.com/npm/npm/issues npm ERR! Windows_NT 10.0.19044 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Legitxl\node_modules\npm\bin\npm-cli.js" "install" npm ERR! node v20.11.0 npm ERR! npm v2.15.12
npm ERR! Unsupported URL Type: npm:string-width@^4.2.0 npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! https://github.com/npm/npm/issues npm ERR! Windows_NT 10.0.19044 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Legitxl\node_modules\npm\bin\npm-cli.js" "install" npm ERR! node v20.11.0 npm ERR! npm v2.15.12
npm ERR! Unsupported URL Type: npm:strip-ansi@^6.0.1 npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! https://github.com/npm/npm/issues`
Use this format to create an new nextjs project using npm.
$ npx create-next-app@latest project-name
If problem persists, reinstall npm or upgrade it to latest release.
Yes, I also can't create next.js app on my Mac M1, anyone can show me how to fix this? I'm using NVM and this never happened before. idk what happend
npm WARN engine [email protected]: wanted: {"node":">=18.17.0"} (current: {"node":"16.13.2","npm":"2.15.12"}) npm WARN peerDependencies The peer dependency ts-node@>=9.0.0 included from postcss-load-config will no npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
[email protected] install /Users/galileor/Petcare/kocak/node_modules/tailwindcss/node_modules/chokidar/node_modules/fsevents node-gyp rebuild
gyp: binding.gyp not found (cwd: /Users/galileor/Petcare/kocak/node_modules/tailwindcss/node_modules/chokidar/node_modules/fsevents) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:261:16)
gyp ERR! stack at ChildProcess.emit (node:events:390:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 23.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/galileor/Petcare/kocak/node_modules/tailwindcss/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v16.13.2
gyp ERR! node-gyp -v v8.3.0
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]
npm WARN peerDependencies The peer dependency @swc/core@>=1.2.50 included from ts-node will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency @swc/wasm@>=1.2.50 included from ts-node will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency @opentelemetry/api@^1.1.0 included from next will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency sass@^1.3.0 included from next will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN engine [email protected]: wanted: {"node":"14 || >=16.14"} (current: {"node":"16.13.2","npm":"2.15.12"})
npm WARN optional dep failed, continuing @next/[email protected]
npm WARN optional dep failed, continuing @next/[email protected]
npm WARN optional dep failed, continuing @next/[email protected]
npm WARN optional dep failed, continuing @next/[email protected]
npm WARN optional dep failed, continuing @next/[email protected]
npm WARN optional dep failed, continuing @next/[email protected]
npm WARN optional dep failed, continuing @next/[email protected]
npm WARN optional dep failed, continuing @next/[email protected]
npm ERR! Darwin 23.3.0
npm ERR! argv "/usr/local/bin/node" "/Users/galileor/node_modules/.bin/npm" "install"
npm ERR! node v16.13.2
npm ERR! npm v2.15.12
npm ERR! Unsupported URL Type: npm:string-width@^4.2.0 npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! https://github.com/npm/npm/issues npm ERR! Darwin 23.3.0 npm ERR! argv "/usr/local/bin/node" "/Users/galileor/node_modules/.bin/npm" "install" npm ERR! node v16.13.2 npm ERR! npm v2.15.12
npm ERR! Unsupported URL Type: npm:strip-ansi@^6.0.1 npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! https://github.com/npm/npm/issues npm ERR! Darwin 23.3.0 npm ERR! argv "/usr/local/bin/node" "/Users/galileor/node_modules/.bin/npm" "install" npm ERR! node v16.13.2 npm ERR! npm v2.15.12
npm ERR! Unsupported URL Type: npm:wrap-ansi@^7.0.0 npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! https://github.com/npm/npm/issues npm WARN peerDependencies The peer dependency @swc/helpers@^0.5.0 included from @swc/core will no npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
[email protected] install /Users/galileor/Petcare/kocak/node_modules/sass/node_modules/chokidar/node_modules/fsevents node-gyp rebuild
gyp: binding.gyp not found (cwd: /Users/galileor/Petcare/kocak/node_modules/sass/node_modules/chokidar/node_modules/fsevents) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:261:16)
gyp ERR! stack at ChildProcess.emit (node:events:390:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 23.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/galileor/Petcare/kocak/node_modules/sass/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v16.13.2
gyp ERR! node-gyp -v v8.3.0
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing @swc/[email protected]
npm WARN optional dep failed, continuing @swc/[email protected]
npm WARN optional dep failed, continuing @swc/[email protected]
npm WARN optional dep failed, continuing @swc/[email protected]
npm WARN optional dep failed, continuing @swc/[email protected]
npm WARN optional dep failed, continuing @swc/[email protected]
npm WARN optional dep failed, continuing @swc/[email protected]
npm WARN optional dep failed, continuing @swc/[email protected]
npm WARN optional dep failed, continuing @swc/[email protected]
@swc/[email protected] postinstall /Users/galileor/Petcare/kocak/node_modules/tailwindcss/node_modules/@swc/core node postinstall.js
npm ERR! Please include the following file with any support request: npm ERR! /Users/galileor/Petcare/kocak/npm-debug.log
Aborting installation. npm install has failed.
You’re using npm 2 on node 16 somehow, both of which are EOL. Upgrade npm to 7 or 8 or 10.
You’re using npm 2 on node 16 somehow, both of which are EOL. Upgrade npm to 7 or 8 or 10.
I'm using nvm. npm, and node is the latest one, that why I have no idea, what's going on
then you may have a system node/npm that's shadowing the nvm one.
Bro, try clean installing LTS version of nodejs.
Yes, I have tried to uninstall and clean my nvm. Error still shows up!
The problem is node-gyp and Problems solve by running this command :
sudo xcodebuild -license accept
after I check doc https://github.com/nodejs/node-gyp/blob/0f1f667b737d21905e283df100a2cb639993562a/macOS_Catalina.md#node-gyp-v7
This does not appear to be an npm issue but an installation one. Also, please use the issue template when creating issues.