Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module adds to dependencies instead of devDependency #399

Closed
RollingTL opened this issue Apr 26, 2024 · 2 comments
Closed

Module adds to dependencies instead of devDependency #399

RollingTL opened this issue Apr 26, 2024 · 2 comments

Comments

@RollingTL
Copy link

RollingTL commented Apr 26, 2024

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

  1. npx nuxi@latest init <project-name> than cd <project-name>
  2. 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 manniL transferred this issue from nuxt/nuxt Apr 26, 2024
@vejja
Copy link

vejja commented Apr 26, 2024

@manniL also referenced in Baroshem/nuxt-security#440

Copy link
Member

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.

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants