It is working well on my local but whenever I try to deploy it on Heroku, It is giving that error.
-----> Build
Running build
> user_auth_and_crud_app_mern_boilerplate@1.0.0 build /tmp/build_160b13dc_
> webpack --env.ENVIRONMENT=production --mode production
/tmp/build160b13dc/node_modules/webpack-cli/bin/cli.js:93
throw err;
^
TypeError: Cannot convert undefined or null to object
at Function.keys ()
at module.exports (/tmp/build160b13dc/checkEnv.setup.js:24:26)
at module.exports (/tmp/build160b13dc/webpack.config.js:16:19)
at handleFunction (/tmp/build160b13dc/node_modules/webpack-cli/bin/utils/prepareOptions.js:21:13)
at prepareOptions (/tmp/build160b13dc/node_modules/webpack-cli/bin/utils/prepareOptions.js:9:5)
at requireConfig (/tmp/build160b13dc/node_modules/webpack-cli/bin/utils/convert-argv.js:117:14)
at /tmp/build160b13dc/node_modules/webpack-cli/bin/utils/convert-argv.js:123:17
at Array.forEach ()
at module.exports (/tmp/build160b13dc/node_modules/webpack-cli/bin/utils/convert-argv.js:121:15)
at /tmp/build160b13dc/node_modules/webpack-cli/bin/cli.js:71:45
at Object.parse (/tmp/build160b13dc/node_modules/webpack-cli/node_modules/yargs/yargs.js:567:18)
at /tmp/build160b13dc/node_modules/webpack-cli/bin/cli.js:49:8
at Object. (/tmp/build160b13dc/node_modules/webpack-cli/bin/cli.js:366:3)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/tmp/build160b13dc/node_modules/webpack/bin/webpack.js:156:2)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! user_auth_and_crud_app_mern_boilerplate@1.0.0 build: webpack --env.ENVIRONMENT=production --mode production
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the user_auth_and_crud_app_mern_boilerplate@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.MC9Ov/_logs/2021-02-12T05_46_25_897Z-debug.log
-----> Build failed
It is working well on my local but whenever I try to deploy it on Heroku, It is giving that error.
-----> Build Running build
/tmp/build160b13dc/node_modules/webpack-cli/bin/cli.js:93 throw err; ^ TypeError: Cannot convert undefined or null to object at Function.keys ()
at module.exports (/tmp/build160b13dc/checkEnv.setup.js:24:26)
at module.exports (/tmp/build160b13dc/webpack.config.js:16:19)
at handleFunction (/tmp/build160b13dc/node_modules/webpack-cli/bin/utils/prepareOptions.js:21:13)
at prepareOptions (/tmp/build160b13dc/node_modules/webpack-cli/bin/utils/prepareOptions.js:9:5)
at requireConfig (/tmp/build160b13dc/node_modules/webpack-cli/bin/utils/convert-argv.js:117:14)
at /tmp/build160b13dc/node_modules/webpack-cli/bin/utils/convert-argv.js:123:17
at Array.forEach ()
at module.exports (/tmp/build160b13dc/node_modules/webpack-cli/bin/utils/convert-argv.js:121:15)
at /tmp/build160b13dc/node_modules/webpack-cli/bin/cli.js:71:45
at Object.parse (/tmp/build160b13dc/node_modules/webpack-cli/node_modules/yargs/yargs.js:567:18)
at /tmp/build160b13dc/node_modules/webpack-cli/bin/cli.js:49:8
at Object. (/tmp/build160b13dc/node_modules/webpack-cli/bin/cli.js:366:3)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/tmp/build160b13dc/node_modules/webpack/bin/webpack.js:156:2)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! user_auth_and_crud_app_mern_boilerplate@1.0.0 build:
webpack --env.ENVIRONMENT=production --mode production
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the user_auth_and_crud_app_mern_boilerplate@1.0.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /tmp/npmcache.MC9Ov/_logs/2021-02-12T05_46_25_897Z-debug.log -----> Build failed! Push rejected, failed to compile Node.js app. ! Push failed