You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting up a vue production app without a staging app we run into the following issue:
vue-cli-service: not found
Vue CLI Service is and is meant to be a dev dependency from what I can tell, but with npm_config_production set to true in production, this causes the frontend app to not build.
I'm assuming that we haven't run into this bug before (as far as I'm aware) because we typically set up staging first and then production and we promote to production which doesn't require a rebuild of the frontend app.
However, I'm labelling this as an issue because we should be able to deploy our apps just for production as needed. My current workaround has been to just set npm_config_production=false in production which is not ideal.
A couple of approaches I tried:
Setting vue-cli-service as a dependency. Caused a chain of other packages to need to be dependencies and we really don't want them to beSetting vue-cli-service as a dependency. Caused a chain of other packages to need to be dependencies and we really don't want them to be
Removing the build command in package.json. Caused (unsurprisingly perhaps) the frontend to just not build/not build in the right folder. Not sure which one yet. Needs looking into further. I feel like removing the vue-cli-service dependency for the build would be the solution here
The text was updated successfully, but these errors were encountered:
When we've looked at this before, we've concluded that setting NPM_CONFIG_PRODUCTION=false is safe in the prod environment. This enables Heroku to install devDependencies, but will still create a 'production' build, because NODE_ENV is set to 'production'.
Before closing this I'd like to take a minute to understand the issue (or the symptom of a possible issue we are seeing).
Safety aside, we'd want to avoid the production build being bulkier than it needs to be (especially if we are install dev dependencies like Cypress...which is large)
When setting up a vue production app without a staging app we run into the following issue:
vue-cli-service: not found
Vue CLI Service is and is meant to be a dev dependency from what I can tell, but with npm_config_production set to true in production, this causes the frontend app to not build.
I'm assuming that we haven't run into this bug before (as far as I'm aware) because we typically set up staging first and then production and we promote to production which doesn't require a rebuild of the frontend app.
However, I'm labelling this as an issue because we should be able to deploy our apps just for production as needed. My current workaround has been to just set npm_config_production=false in production which is not ideal.
A couple of approaches I tried:
The text was updated successfully, but these errors were encountered: