Closed VenturaFranklin closed 3 years ago
Thanks for reporting the issue @VenturaFranklin. Running the app with yarn start
locally has been working fine for me, maybe because of caching. However, I now also noticed the craco: *** Cannot find ESLint loader (eslint-loader). ***
message when building the package with yarn build
.
According to https://github.com/DocSpring/craco-less/issues/52, craco 6.0.0 already supports react-scripts > 4.0.0, but the craco-less package dependencies have not yet been updated.
I've updated the dependencies in package.json
(#24) in an attempt to fix the issue. This results in a warning message when building the package:
warning " > craco-less@1.17.1" has incorrect peer dependency "@craco/craco@^5.5.0"
However, I've tested building and running the app (docker-compose up
, yarn start
, yarn build
, and yarn lint
) and everything seems to be working fine.
Could you kindly take a look at #24 and try again with the bugfix/dependencies
branch to see if that resolves your issue?
I cloned and then checked out that branch.
npm install --force
get's around the incorrect peer dependency on install.
However, npm start
still has the issue with craco-less
D:\workspace\DICOM\slim (bugfix/dependencies -> origin)
λ npm start
> slim@0.1.1 start
> craco start
(node:7732) UnhandledPromiseRejectionWarning: Error: Found an unhandled loader in the ventura webpack config: D:\workspace\DICOM\slim\node_modules\style-loader\dist\cjs.js
This error probably occurred because you updated react-scripts or craco. Please try updating craco-less to the latest version:
$ yarn upgrade craco-less
Or:
$ npm update craco-less
If that doesn't work, craco-less needs to be fixed to support the latest version.
Please check to see if there's already an issue in the DocSpring/craco-less repo:
* https://github.com/DocSpring/craco-less/issues?q=is%3Aissue+webpack+unknown+rule
If not, please open an issue and we'll take a look. (Or you can send a PR!)
You might also want to look for related issues in the craco and create-react-app repos:
* https://github.com/sharegate/craco/issues?q=is%3Aissue+webpack+unknown+rule
* https://github.com/facebook/create-react-app/issues?q=is%3Aissue+webpack+unknown+rule
at throwUnexpectedConfigError (D:\workspace\DICOM\slim\node_modules\@craco\craco\lib\plugin-utils.js:29:11)
at throwError (D:\workspace\DICOM\slim\node_modules\craco-less\lib\craco-less.js:14:5)
at D:\workspace\DICOM\slim\node_modules\craco-less\lib\craco-less.js:119:7
at Array.forEach (<anonymous>)
at Object.overrideWebpackConfig (D:\workspace\DICOM\slim\node_modules\craco-less\lib\craco-less.js:51:11)
at overrideWebpack (D:\workspace\DICOM\slim\node_modules\@craco\craco\lib\features\plugins.js:42:40)
at D:\workspace\DICOM\slim\node_modules\@craco\craco\lib\features\plugins.js:64:29
at Array.forEach (<anonymous>)
at applyWebpackConfigPlugins (D:\workspace\DICOM\slim\node_modules\@craco\craco\lib\features\plugins.js:63:29)
at mergeWebpackConfig (D:\workspace\DICOM\slim\node_modules\@craco\craco\lib\features\webpack\merge-webpack-config.js:110:30)
(node:7732) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:7732) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
This was only fixed by uninstalling craco-less and commenting out the craco-less config.
However, yarn build
and then yarn global add serve
with serve -s build
work just fine.
Thanks for testing @VenturaFranklin. I hope the issue will soon be resolved with the next release of craco-less.
I am also wondering whether you tried using yarn start
instead of npm start
?
From the base git clone and setting the config for the hackathon:
after running
yarn start
I get the error:craco: Cannot find ESLint loader (eslint-loader).
It seems that craco 5.8.0 is not compatible with react-scripts > 4
I tried downgrading react-scripts but then that set off a cascade of incompatibilities. So I tried the other way to fix this by upgrading craco to ^6 but then craco-less is not compatible.
After commenting out all craco-less config in craco.config.js leaving only:
Now
yarn start
works