Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module ' react-hot-loader/babel' While deploying to heroku #49

Open
ghost opened this issue Jun 18, 2021 · 3 comments

Comments

@ghost
Copy link

ghost commented Jun 18, 2021

No description provided.

@Bikranshu
Copy link
Owner

Have you tried heroku config:set NPM_CONFIG_PRODUCTION=false

@ghost
Copy link
Author

ghost commented Jun 18, 2021

Yes, I did that but there were few more issues with port binding as this command deploy the complete app including devdependencies which also increases the size from 34 MB to 88MB

@dream-topdev
Copy link
Contributor

dream-topdev commented Jan 26, 2022

I updated package.json. You can change "scripts" option as belows.

"scripts": {
"start": "babel-node server/app.js",
"clean": "rimraf node_modules && rimraf dist && npm install",
"webpack:dev": "cross-env NODE_ENV=development webpack --config ./webpack/webpack.config.dev.js",
"webpack:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--openssl-legacy-provider webpack --config ./webpack/webpack.config.prod.js",
"build:dev": "rimraf dist && npm run webpack:dev && npm run start",
"build": "rimraf dist && npm run webpack:prod && npm run start",
"migrate": "knex migrate:latest",
"migrate:make": "knex migrate:make",
"migrate:rollback": "knex migrate:rollback",
"lint": "eslint client server; exit 0"
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants