在reactjs中创建新应用程序时遇到问题

时间:2019-02-23 16:33:42

标签: reactjs npm

尝试使用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.

1 个答案:

答案 0 :(得分:0)

1)转到命令行 2)放入c驱动器中。 3)做node -v
它应该显示您已安装的节点的版本。如果不是,则表明您的PC中没有安装node。节点的链接为

https://nodejs.org/en/download/

请确保您为正确的操作系统安装了正确的版本。