Module adds to dependencies instead of devDependency
Closed this issue · 2 comments
Environment
System:
OS: macOS 11.7.10
CPU: (4) x64 Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz
Memory: 3.06 GB / 24.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 20.4.0 - /usr/local/bin/node
npm: 9.7.2 - /usr/local/bin/npm
Browsers:
Chrome: 124.0.6367.79
Safari: 16.6.1
npmPackages:
nuxt: ^3.11.2 => 3.11.2
Reproduction
npx nuxi@latest init <project-name>
thancd <project-name>
npx nuxi@latest module add i18n
And the result package.json is:
"dependencies": {
"@nuxtjs/i18n": "^8.3.1",
}
instead of:
"devDependencies": {
"@nuxtjs/i18n": "^8.3.0",
}
Describe the bug
When using nuxi module add it places dependency in dependencies part of package.json instead of devDependency.
About a week ago i did similar installation and it was placed in proper way (to devDependency). Now something is changed.
Additional context
No response
Logs
No response
@manniL also referenced in Baroshem/nuxt-security#440
To be clear, it doesn't make a difference as Nuxt generates a fully self-contained .output
folder with its own node_modules.
We have shifted to install nuxt + modules as dependencies
, with the possibility of keeping things like linters for devDependencies
.
So this isn't a bug but a desired change of behaviour. But ultimately it's up to you.