Some problems encountered in the initial construction of Ant Design Pro project, such as cross Env, webpack and so on

    encountered the following webpack problems.
There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

  "webpack": "4.44.2"

Don't try to install it manually: your package manager does it automatically.
However, a different version of webpack was detected higher up in the tree:

  /Users/admin/node_modules/webpack (version: 5.2.6) 

causes: /users/admin/node_ The modules/ folder has a higher version of webpack than the one used when creating create react app .
solution: in the corresponding folder, sudo NPM unified webpack - G and sudo NPM unified webpack cli - G uninstall the manually installed webpack package tools. Because react will generate its own appropriate version of webpack. If it is installed manually, there will be version conflicts.

TheNPM run dev message is not an internal or external command, nor a runnable program or batch file.

> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"
'cross-env' Not an internal or external command, and not a runnable program or batch file. `

reason: is not installed with administrator rights
solution: is installed with administrator rights in the project sudo yard install installation
PS: installation command

yarn create umi mypro //mypro is the project noun
=> Select ant-design-pro
=> Select V5/V4
cd mypro // move to the mypro folder
sudo yarn install
** wait for installation, the process may be slow, it is recommended to set taobao image **
yarn start //start mypro project

Project construction reference:
Ant Design Pro project construction

Read More: