3.0.0-beta.15
https://github.com/redxtech/vue-cli-node-env-error
1) Initialize new repo with @vue/cli
2) run NODE_ENV=production yarn or NODE_ENV=production npm install
3) run command that uses @vue/cli-service: yarn lint
4) observer error: vue-cli-service: command not found
I would expect the vue-cli-service binary to be moved into node_modules/.bin so that running yarn lint or other commands would work.
The vue-cli-service binary is not moved into node_modules/.bin, causing all commands invoking it to fail.
I tested this with both yarn and npm, on multiple operating systems (docker images) from debian to arch with the same results.
Actually came across it on CircleCI using the environment variables there, but adding it in front of the command has the same effect.
https://yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-production-true-false
If you want vue-cli-service to be installed in that mode, move it from devDependencies to dependencies (and all other related dependencies as well)
ah ok that makes complete sense must have missed that thanks for the clarification
Most helpful comment
https://yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-production-true-false
If you want vue-cli-service to be installed in that mode, move it from
devDependenciestodependencies(and all other related dependencies as well)