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

npm install --omit=dev FAILS #819

Closed
MarioAda opened this issue Mar 6, 2024 · 2 comments
Closed

npm install --omit=dev FAILS #819

MarioAda opened this issue Mar 6, 2024 · 2 comments

Comments

@MarioAda
Copy link

MarioAda commented Mar 6, 2024

Version

@nuxtjs/tailwindcss: 6.11.4
nuxt: 3.10.3

Steps to reproduce

  1. Create a new Nuxtjs application using npx nuxi@latest init
  2. Run npm install -D @nuxtjs/tailwindcss
  3. Add '@nuxtjs/tailwindcss' to modules in nuxt.config (optional)
  4. Run npm install --omit=dev

What is Expected?

Successful install

What is actually happening?

We get an error
Cannot find module '/var/app/staging/@nuxtjs/tailwindcss'

In a production environment, it's common NOT to install development dependencies, hence the npm install --omit=dev, but that fails in Nuxt.

This also applies to plugins of Tailwindcss, and even other modules like ESLINT.

We're forced to run npm install or move everything from devDependencies to dependencies.

@MarioAda MarioAda added the bug Something isn't working label Mar 6, 2024
@ineshbose
Copy link
Collaborator

This error makes sense though, right? If you're omitting dev dependencies and trying to start a Nuxt dev server that uses module dependencies listed there, it wouldn't work. I think you're looking to run a build/preview or move the modules to dependencies.

Let me know what you think.

@ineshbose ineshbose removed the bug Something isn't working label Mar 13, 2024
@ineshbose ineshbose closed this as not planned Won't fix, can't repro, duplicate, stale Mar 17, 2024
@MarioAda
Copy link
Author

MarioAda commented Mar 17, 2024

We're not trying to start a "dev" server though. We're installing non dev packages to start a prod server for ssr

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

2 participants