ShakaCode | ShakaCode Blog | Rails On Maui Blog | Rails | ReactJs | JavaScript | Webpack | Productivity |

Module Not Found when Deploying to Heroku


#1

I’m running into an issue with NPM packages when deploying to Heroku. Locally, everything runs fine but once I try and push the build up, I get this issue.

remote: ERROR in ./app/bundles/HelloWorld/components/HelloWorld.jsx
remote: Module not found: Error: Can’t resolve ‘axios’ in ‘/tmp/build_bc08392abeb14c34077754fa5a55bbf2/client/app/bundles/HelloWorld/components’
remote: @ ./app/bundles/HelloWorld/components/HelloWorld.jsx 13:13-29
remote: @ ./app/bundles/HelloWorld/startup/registration.jsx
remote: @ multi es5-shim/es5-shim es5-shim/es5-sham babel-polyfill ./app/bundles/HelloWorld/startup/registration

Just not sure I fully understand how this is working and where to include the packages. Any help would be greatly appreciated, thanks!


#2

Given your error, I’m surprised that this works locally.

If you want personalized help on this, please consider our Coaching Plan.