Shopify / shopify-app-template-node

MIT License
860 stars 393 forks source link

Additional dependencies not working when deploying to heroku #1276

Closed andrerigon closed 1 year ago

andrerigon commented 1 year ago

Issue summary

Hi,

We added some additional dependencies to the app when developing locally (via yarn add <dep>. When deploying to heroku, it uses the frontend package.json and the deps aren't available, causing the deploy to crash:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'multer' imported from /app/index.js
2023-06-06T20:44:47.331310+00:00 app[web.1]: at new NodeError (node:internal/errors:399:5)
2023-06-06T20:44:47.331311+00:00 app[web.1]: at packageResolve (node:internal/modules/esm/resolve:889:9)
2023-06-06T20:44:47.331311+00:00 app[web.1]: at moduleResolve (node:internal/modules/esm/resolve:938:20)

Can you advise on what is the expected approach to deploy the app to heroku?

Thank you,

Andre

andrerigon commented 1 year ago

Never mind - I realised that there is another package.json for the web folder that should contain the dependencies.