why are dev dependencies needed at runtime ?
See original GitHub issueI’ve created a fresh new project today with npx create-nuxt-app xxx
It was impossible to deploy it to heroku. (It builded correctly but crashed on server start)
Multiple errors were thrown one after the other
Error: Cannot find module 'vuetify/es5/util/colors'
=> solved by moving@nuxtjs/vuetify
to dependenciesError: Cannot find module '@nuxtjs/eslint-module'
=> solved by moving@nuxtjs/eslint-module
to dependenciesError: Cannot find module '@nuxtjs/stylelint-module'
=> solved by moving@nuxtjs/stylelint-module
to dependencies
But those are bad fixes, those should stay in dev dependencies.
You can reproduce the error with the following steps :
npm install
npm run build
npm prune --production
npm run start
the options used for create-nuxt-app :
- npm
- Vuetify.js
- Express
- with all nuxt modules (axios, PWA support, dotenv)
- with all linting tools (ESLint, Prettier, Lint staged files, StyleLint)
- Jest
- Universal
- with jsconfig.json
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Demystifying `devDependencies` and `dependencies`
Development dependencies, or devDependencies are packages that are consumed by requiring them in files or run as binaries, during the ...
Read more >Difference between dependencies, devDependencies and ...
A dependency is a library that a project needs to function effectively. DevDependencies are the packages a developer needs during development. A ...
Read more >NPMmmm #1: Dev Dependencies, Dependencies - Medium
The difference between these two, is that devDependencies are modules which are only required during development, while dependencies are modules which are also ......
Read more >node.js - What's the difference between dependencies ...
devDependencies is not installed transitively. E.g. we don't need to test B to test A, so B's testing dependencies can be left out....
Read more >Is this a dependency or devDependency? - With Blue Ink
dependencies : Packages required by your application in production. · devDependencies : Packages that are only needed for local development and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@chrismooreproductions You need at least
nuxt-start
and typescript-runtime independencies
. This is current nuxt2 limitation (we are working on new server engine that allows zero dependency deployments)I’m reopenning this issue. With a fresh
yarn create nuxt-app
andyarn install --production
I get this error:I should be able to install for production and start without problem. Please keep a clean package.json 🙏
edit: it’s
vue-jest
package who needs to be installed in production mode.