[英]Not able to create ReactJS application
npx create-react-app myapp npx create-react-app myapp
'CALL "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command, operable program or batch file. 'CALL "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" 前缀 -g' 未被识别为内部或外部命令,可运行的程序或批处理文件。 spawn C:\Program Files\MySQL\MySQL Server 5.7\bin ENOENT产生 C:\Program Files\MySQL\MySQL Server 5.7\bin ENOENT
Do you have create-react-app installed?你安装了 create-react-app 吗? If it is installed just run create-react-app myapp如果已安装,只需运行 create-react-app myapp
Try yarn
it's an alternative node package manager.试试yarn
,它是一个替代节点 package 管理器。 I had similar problems with npm
我对npm
有类似的问题
yarn create react-app app-name
Looks like there could be some fault in your node installation.看起来您的节点安装可能有一些错误。 But before that make sure your npm is of at least 5.2.0 or newer.但在此之前,请确保您的 npm 至少为 5.2.0 或更高版本。 To update it to the latest do npm install -g npm
.要将其更新到最新npm install -g npm
。 If it still doesn't work, you should remove any global installation of create-react-app and retry.如果它仍然不起作用,您应该删除 create-react-app 的所有全局安装并重试。 At last, I'd try to reinstall Node if I were you.最后,如果我是你,我会尝试重新安装 Node。
Its seems link there is some error with your npm.它的链接似乎与您的 npm 有一些错误。 Try cleaning the cache by doing尝试通过执行清理缓存
npm cache clean --force
and after that run然后在那次运行之后
npm cache verify
now try creating your reach app by typing现在尝试通过键入来创建您的覆盖面应用
npx create-react-app myapp
Even after doing this won't work do install latest npm again by doing即使这样做也不起作用,请再次安装最新的 npm
npm install npm@latest -g
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.