我最近使用npm uninstall -g create-react-app
在全球范围内卸载了CRA,因此我现在应该根据CRA文档使用npx create-react-app my-app
。令我丧命的是,我现在遇到一个错误,似乎无法修复自己:
npm ERR! code ENOLOCAL
npm ERR! Could not install from "pc\AppData\Roaming\npm-cache\_npx\8848" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lenovo pc\AppData\Roaming\npm-cache\_logs\2019-12-17T07_27_25_590Z-debug.log
Install for [ 'create-react-app@latest' ] failed with code 1
TIA!