Open deepan96 opened 2 years ago
Module not found
/ Can't resolve
errors during build are typically due to differences between the committed files and how they are referenced in the code.
See: https://github.com/mars/create-react-app-buildpack/issues/71#issuecomment-385723967
Also, I notice you're using https://github.com/timanovsky/subdir-heroku-buildpack.git in this app.
Based on what that buildpack does during build (promoting a subdirectory to be the root for build), this may be causing ./redux/store
to be missing.
I am trying to deploy my react app to heroku which runs perfectly fine on local. But I keep seeing the error "Module not found: Error: Can't resolve './redux/store' in '/tmp/build_f1f2b62e/src' " even though the file is present. Any help is appreciated. I am also attaching the build log below:
-----> Building on the Heroku-20 stack -----> Using buildpacks:
-----> Creating runtime environment
-----> Installing binaries engines.node (package.json): 14.8.0 engines.npm (package.json): unspecified (use default)
-----> Restoring cache Caching has been disabled because NODE_MODULES_CACHE=false
-----> Installing dependencies Installing node modules
-----> Build Running build
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! client@0.1.0 build:
react-scripts build
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the client@0.1.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.u2qg2/_logs/2022-04-27T05_20_08_537Z-debug.log -----> Build failed! Push rejected, failed to compile Node.js app. ! Push failed