A
A
Artem Rassadin2022-02-10 22:16:44
Node.js
Artem Rassadin, 2022-02-10 22:16:44

CRA error. Html Webpack Plugin: Error: Child compilation failed. What is the problem?

I'm creating a normal react application via npx create-react-app app-name --template typescript , but as a result I get this error:

Html Webpack Plugin:
  Error: Child compilation failed:
  Module build failed (from ../../../#Node/authorization/6. crypto-converter/node_modules/html-webpack-pl  ugin/lib/loader.js):
  Error: Cannot find module 'C:\#Node\authorization\6. crypto-converter\node_modules\html-webpack-plugin\  lib\loader.js'
После этого большое количество других подобных ошибок

Before that, I have a warning in the console:
(node:2720) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:2720) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.

Tried:
  1. Create an application in a different directory
  2. Install other versions of node.js (16.14.0, 17.4.0, 16.13.2 - active)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Rassadin, 2022-02-11
@Artyom02

Solution: install [email protected] . If you know how to make the default version work, please write

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question