【发布时间】:2020-09-27 15:41:35
【问题描述】:
npx create-react-app my-app
Creating a new React app in G:\project\my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
'sh' is not recognized as an internal or external command,
operable program or batch file.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts cra-template --cwd G:\project\my-app has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting my-app/ from G:\project
Done.
我已经尝试使用npm clear cache --force 清除 npm 缓存。同样的事情也会发生。
【问题讨论】: