Open IgnisDa opened 3 years ago
I experienced this same issue. It seems to be due to automatic pruning of devDependencies in the buildpack.
From Heroku troubleshooting:
In order create a smaller slug size for apps, the buildpack will prune out the devDependencies from the package.json at the end of the build, so that the slug will only include the dependencies that are listed at runtime. If there is a dependency that is in the devDependencies that is needed after the prune occurs, move the dependency to dependencies, so it is not removed.
So to fix it you can either move the devDependencies
to dependencies
or turn off pruning of devDependencies
with NPM: heroku config:set NPM_CONFIG_PRODUCTION=false
YARN: heroku config:set YARN_PRODUCTION=false
I encountered this problem while deploying my nuxt app to Heroku. My app has a dependency on this module. I have
target: 'server'
set in mynuxt.config.js
.The solution was pretty simple. The installation instructions say that you have to install this dependency as a development one. But that works only for nuxt apps that have
target: 'static'
set in theirnuxt.config.js
.I feel this should be mentioned in the installation instructions for the module