尝试使用create-react-app
创建新的react应用时遇到以下错误。
bash
$ npx create-react-app demotech
npx: installed 63 in 50.553s
Creating a new React app in D:\js-tech\reactjs\demotech.
'npm' is not recognized as an internal or external command,
operable program or batch file.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
'npm' is not recognized as an internal or external command,
operable program or batch file.
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts@0.9.x has failed.
Deleting generated file... package.json
Deleting demotech/ from D:\js-tech\reactjs
Done.
答案 0 :(得分:0)
1)转到命令行
2)放入c
驱动器中。
3)做node -v
它应该显示您已安装的节点的版本。如果不是,则表明您的PC中没有安装node
。节点的链接为
https://nodejs.org/en/download/
请确保您为正确的操作系统安装了正确的版本。