L
L
leonardoHof2022-01-09 17:35:30
Node.js
leonardoHof, 2022-01-09 17:35:30

Error while building React app?

Good day, when creating a React application via npm create-react-app with and without TS, there are a lot of errors, I tried to reinstall Node JS, nothing helped, it also does not run through yarn, it gives the following error

$ yarn start
yarn run v1.22.17
$ react-scripts start
(node:9228) [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:9228) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
Starting the development server...

Failed to compile.

Error: Cannot find module 'D:\Works\#SHOP\client\node_modules\babel-loader\lib\index.js'
Require stack:
- D:\Works\#SHOP\client\node_modules\loader-runner\lib\loadLoader.js
- D:\Works\#SHOP\client\node_modules\loader-runner\lib\LoaderRunner.js
- D:\Works\#SHOP\client\node_modules\webpack\lib\NormalModule.js
- D:\Works\#SHOP\client\node_modules\webpack-manifest-plugin\dist\index.js
- D:\Works\#SHOP\client\node_modules\react-scripts\config\webpack.config.js
- D:\Works\#SHOP\client\node_modules\react-scripts\scripts\start.js
asset static/js/bundle.js 46.8 KiB [emitted] (name: main) 1 related asset
asset index.html 7.69 KiB [emitted]
asset asset-manifest.json 190 bytes [emitted]
runtime modules 27.1 KiB 9 modules
modules with errors 117 bytes [errors]
  ../../#SHOP/client/node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js 39 bytes [not cacheable] [built] [code generated] [1 error]
  ../../#SHOP/client/node_modules/webpack/hot/dev-server.js 39 bytes [not cacheable] [built] [code generated] [1 error]
  ../../#SHOP/client/src/index.tsx 39 bytes [not cacheable] [built] [code generated] [1 error]





1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)

1 error has detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.65.0 compiled with 6 errors in 2205 ms
Files successfully emitted, waiting for typecheck results...
Issues checking in progress...
No issues found.


Also opens a page with the same text
rbplxLP.png

Node JS version 16.13.1

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Aetae, 2022-01-10
@leonardoHof

I suspect #an extra one on the way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question