yarn create nuxt -h gives old flags?

On Windows 11, I put in the command yarn create nuxt -h and it gave me the following:
yarn create nuxt -h
yarn create v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "[email protected]" with binaries:
- create-nuxt
Create a Nuxt app in seconds (create-nuxt v3.22.5)

USAGE create-nuxt [OPTIONS] [DIR]

ARGUMENTS

DIR Project directory

OPTIONS

--cwd=<directory> Specify the working directory
-t, --template Template name
-f, --force Override existing directory
--offline Force offline mode
--preferOffline Prefer offline mode
--no-install Skip installing dependencies
--gitInit Initialize git repository
--shell Start shell after installation in project directory
--packageManager Package manager choice (npm, pnpm, yarn, bun)
-M, --modules Nuxt modules to install (comma separated without spaces)


Done in 1.58s.
yarn create nuxt -h
yarn create v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "[email protected]" with binaries:
- create-nuxt
Create a Nuxt app in seconds (create-nuxt v3.22.5)

USAGE create-nuxt [OPTIONS] [DIR]

ARGUMENTS

DIR Project directory

OPTIONS

--cwd=<directory> Specify the working directory
-t, --template Template name
-f, --force Override existing directory
--offline Force offline mode
--preferOffline Prefer offline mode
--no-install Skip installing dependencies
--gitInit Initialize git repository
--shell Start shell after installation in project directory
--packageManager Package manager choice (npm, pnpm, yarn, bun)
-M, --modules Nuxt modules to install (comma separated without spaces)


Done in 1.58s.
Then I ran yarn create nuxt . --packageManager yarn --gitInit false to give me:
yarn create v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "[email protected]" with binaries:
- create-nuxt
(SKIPPING SOME LINES TO SAVE SPACE FOR DISCORD...)
◐ Installing dependencies... nuxi 10:30:56 AM
! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing [email protected]+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447.
! For more details about this field, consult the documentation at https://nodejs.org/api/packages.html#packagemanager

yarn install v1.22.19
info No lockfile found.
[1/4] Resolving packages...
⠁ (node:48608) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "nuxt > @nuxt/[email protected]" has unmet peer dependency "vite@>=6.0".
warning "nuxt > @nuxt/devtools > [email protected]" has unmet peer dependency "vite@^6.0.0".
warning "nuxt > @nuxt/devtools > [email protected]" has unmet peer dependency "vite@^6.0.0".
warning "nuxt > @nuxt/devtools > @nuxt/[email protected]" has unmet peer dependency "vite@>=6.0".
warning "nuxt > nitropack > [email protected]" has unmet peer dependency "typescript@^5.x".
warning "nuxt > @nuxt/devtools > @vue/devtools-core > [email protected]" has unmet peer dependency "vite@^2.6.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0".
warning "nuxt > @nuxt/devtools > vite-plugin-inspect > [email protected]" has unmet peer dependency "vite@^2.9.0 || ^3.0.0-0 || ^4.0.0-0 || ^5.0.0-0 || ^6.0.1".
warning "nuxt > @nuxt/devtools > vite-plugin-inspect > vite-dev-rpc > [email protected]" has unmet peer dependency "vite@^2.6.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0".
[4/4] Building fresh packages...
success Saved lockfile.
$ nuxt prepare
✔ Types generated in .nuxt nuxi 10:31:26 AM
Done in 28.91s.
✔ Installation completed.
yarn create v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "[email protected]" with binaries:
- create-nuxt
(SKIPPING SOME LINES TO SAVE SPACE FOR DISCORD...)
◐ Installing dependencies... nuxi 10:30:56 AM
! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing [email protected]+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447.
! For more details about this field, consult the documentation at https://nodejs.org/api/packages.html#packagemanager

yarn install v1.22.19
info No lockfile found.
[1/4] Resolving packages...
⠁ (node:48608) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "nuxt > @nuxt/[email protected]" has unmet peer dependency "vite@>=6.0".
warning "nuxt > @nuxt/devtools > [email protected]" has unmet peer dependency "vite@^6.0.0".
warning "nuxt > @nuxt/devtools > [email protected]" has unmet peer dependency "vite@^6.0.0".
warning "nuxt > @nuxt/devtools > @nuxt/[email protected]" has unmet peer dependency "vite@>=6.0".
warning "nuxt > nitropack > [email protected]" has unmet peer dependency "typescript@^5.x".
warning "nuxt > @nuxt/devtools > @vue/devtools-core > [email protected]" has unmet peer dependency "vite@^2.6.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0".
warning "nuxt > @nuxt/devtools > vite-plugin-inspect > [email protected]" has unmet peer dependency "vite@^2.9.0 || ^3.0.0-0 || ^4.0.0-0 || ^5.0.0-0 || ^6.0.1".
warning "nuxt > @nuxt/devtools > vite-plugin-inspect > vite-dev-rpc > [email protected]" has unmet peer dependency "vite@^2.6.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0".
[4/4] Building fresh packages...
success Saved lockfile.
$ nuxt prepare
✔ Types generated in .nuxt nuxi 10:31:26 AM
Done in 28.91s.
✔ Installation completed.
Mainly: ! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing [email protected]+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447. Why does it say it doesn't define a package manager field if I did? Also, I keep getting a punycode error but I'm not sure what that is.
2 Replies
kapa.ai
kapa.ai2mo ago
Hi @Zack Plauché. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information you've provided, I can help explain what's happening with your Nuxt installation commands. Package Manager Field Issue When you run yarn create nuxt . --packageManager yarn --gitInit false, the --packageManager flag is only telling the Nuxt initialization process which package manager to use for installing dependencies. It doesn't automatically add the packageManager field to your project's package.json file. The message you're seeing:
! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing [email protected]+...
! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing [email protected]+...
This is actually expected behavior. Corepack (a Node.js feature) is detecting that you're using Yarn and is automatically adding the packageManager field to your package.json file. This is a helpful feature that ensures consistent package manager usage across your project as described in the Nuxt contribution docs. Punycode Deprecation Warning Regarding the punycode deprecation warning:
(node:48608) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(node:48608) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
This is a known issue when using Node.js 22 with Nuxt and its dependencies. According to the GitHub issue discussion, this warning comes from dependencies in the project, specifically from packages like eslint, ajv, and uri-js that are using the deprecated punycode module as mentioned in this GitHub issue. The warning doesn't affect the functionality of your Nuxt application - it's just informing you that some dependencies are using a deprecated Node.js module. This is something that will eventually need to be fixed by the maintainers of those dependencies, not something you need to fix in your project. About the Command Flags The flags you're seeing in yarn create nuxt -h are the current options for the Nuxt CLI initialization command. These are the correct and up-to-date flags for creating a new Nuxt project using the create-nuxt package (version 3.22.5 in your case). If you want to initialize a new Nuxt project with specific options, the command you used (yarn create nuxt . --packageManager yarn --gitInit false) is correct, though note that --gitInit false is telling it not to initialize a git repository. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@598587664622419979> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?