DocSpring / craco-antd

A craco plugin to use Ant Design with create-react-app
MIT License
234 stars 49 forks source link

not support create react app 4.x #55

Closed gauseen closed 2 years ago

gauseen commented 3 years ago
craco start

(node:9289) UnhandledPromiseRejectionWarning: Error: Found an unhandled loader in the development webpack config: /Users/eleme/Desktop/workspace/im-sdk-demo/node_modules/_style-loader@1.3.0@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 FormAPI/craco-less repo:

   * https://github.com/FormAPI/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 (/Users/eleme/Desktop/workspace/im-sdk-demo/node_modules/_@craco_craco@6.1.1@@craco/craco/lib/plugin-utils.js:29:11)
    at throwError (/Users/eleme/Desktop/workspace/im-sdk-demo/node_modules/_craco-less@1.17.0@craco-less/lib/craco-less.js:14:5)
    at /Users/eleme/Desktop/workspace/im-sdk-demo/node_modules/_craco-less@1.17.0@craco-less/lib/craco-less.js:119:7
    at Array.forEach (<anonymous>)
    at Object.overrideWebpackConfig (/Users/eleme/Desktop/workspace/im-sdk-demo/node_modules/_craco-less@1.17.0@craco-less/lib/craco-less.js:51:11)
    at Object.overrideWebpackConfig (/Users/eleme/Desktop/workspace/im-sdk-demo/node_modules/_craco-antd@1.19.0@craco-antd/lib/craco-antd.js:64:26)
    at overrideWebpack (/Users/eleme/Desktop/workspace/im-sdk-demo/node_modules/_@craco_craco@6.1.1@@craco/craco/lib/features/plugins.js:42:40)
    at /Users/eleme/Desktop/workspace/im-sdk-demo/node_modules/_@craco_craco@6.1.1@@craco/craco/lib/features/plugins.js:64:29
    at Array.forEach (<anonymous>)
    at applyWebpackConfigPlugins (/Users/eleme/Desktop/workspace/im-sdk-demo/node_modules/_@craco_craco@6.1.1@@craco/craco/lib/features/plugins.js:63:29)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:9289) 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:9289) [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.
michaellee1 commented 3 years ago

Getting this same error ☹️

a-rebets commented 3 years ago

Yeah, this is a highly requested change

Since the new JSX transform which allows for different optimizations (including getting rid of import React statements) is included only from 4+ version of react-scripts, and this plugin doesn't seem to be working with that

flyingcrp commented 2 years ago

Yeah, this is a highly requested change

Since the new JSX transform which allows for different optimizations (including getting rid of import React statements) is included only from 4+ version of react-scripts, and this plugin doesn't seem to be working with that

is there a plan to support react-script 4.x ?