Closed acarlie closed 4 years ago
š Thanks for opening your first issue here! If you're reporting a š bug, please make sure you've completed all the fields in the issue template so we can best help.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
Did you try to move @semantic-ui-react/craco-less
to production dependencies? I don't have any experience with Heroku, but it can be a case...
I tried, then it has trouble finding the semantic.less file imported to the index.js. It still works on my local with that change, just not on deploy to Heroku.
> craco build
Creating an optimized production build...
Failed to compile.
./src/index.js
Cannot find module: 'semantic-ui-less/semantic.less'. Make sure this package is installed.
You can install this package by running: npm install semantic-ui-less/semantic.less.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mern-food-lookup-client@0.1.0 build: `craco build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mern-food-lookup-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.BifN1/_logs/2019-11-20T21_31_07_191Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mern-food-lookup@1.0.0 build: `cd client && npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mern-food-lookup@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.BifN1/_logs/2019-11-20T21_31_07_203Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mern-food-lookup@1.0.0 heroku-postbuild: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mern-food-lookup@1.0.0 heroku-postbuild 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.BifN1/_logs/2019-11-20T21_31_07_216Z-debug.log
And if you will move semantic-ui-less
to production deps, too? Will it work?
That did help, the build finally succeeded, but the app is now erroring out.
2019-11-20T22:51:35.172720+00:00 app[web.1]: [1] at overrideWebpackDev (/app/client/node_modules/@craco/craco/lib/features/webpack/override.js:11:36)
2019-11-20T22:51:35.172722+00:00 app[web.1]: [1] at Object.<anonymous> (/app/client/node_modules/@craco/craco/scripts/start.js:25:1)
2019-11-20T22:51:35.172723+00:00 app[web.1]: [1] at Module._compile (internal/modules/cjs/loader.js:936:30)
2019-11-20T22:51:35.172725+00:00 app[web.1]: [1] at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
2019-11-20T22:51:35.172727+00:00 app[web.1]: [1] at Module.load (internal/modules/cjs/loader.js:790:32)
2019-11-20T22:51:35.199206+00:00 app[web.1]: [1] npm run client exited with code 1
2019-11-20T22:51:35.284735+00:00 heroku[web.1]: State changed from starting to crashed
2019-11-20T22:51:35.263136+00:00 heroku[web.1]: Process exited with status 1
2019-11-20T22:51:36.757707+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=testing-mern-2019.herokuapp.com request_id=90e506ef-0f47-410a-b337-c067ed56941c fwd="24.211.136.94" dyno= connect= service= status=503 bytes= protocol=https
2019-11-20T22:51:37.629076+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=testing-mern-2019.herokuapp.com request_id=93cc92dd-7672-4002-a1f3-3fdf691a9323 fwd="24.211.136.94" dyno= connect= service= status=503 bytes= protocol=https
As I see this issue is not related to our tools š¤ And I am not sure that someone will be able to provide you a proper answer there, or at least I š„ Because as I mentioned before I don't have any experience with Heroku.
So, I propose you to move this issue as a question to StackOverflow. If you will find a solution please post it there š
Thanks for your help!
CRA app using using @semantic-ui-react/craco-less failing on deployment build to Heroku.
The CRA app runs locally, but fails when attempting to deploy to Heroku. I receive the error: Error: Cannot find module '@semantic-ui-react/craco-less' even though that package is listed as a dev dependency in my client package.json.
I followed the theming guide here: https://react.semantic-ui.com/theming/ to set up my CRA app (using craco without ejecting).
My client package JSON:
Deployment Error: