javascript - 当我尝试教程时,React 不断中止安装
问题描述
我今天试图按照反应网站上的教程进行操作,但是无论出于何种原因,当我运行命令时它都不想为我工作:
npx create-react-app my-app
`我收到以下错误信息;
Creating a new React app in D:\NodeJs\react\my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
npm ERR! code ETARGET
npm ERR! notarget No matching version found for postcss@^7.0.11
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'autoprefixer'
npm ERR! notarget
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\matth\AppData\Roaming\npm-cache\_logs\2019-01-
12T17_55_39_805Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-
scripts has failed.
Deleting generated file... package.json
Deleting my-app/ from D:\NodeJs\react
Done.`
我的 npm 版本是 6.5.0,Node 是 11.6.0
不知道到底发生了什么,因为当我在我的工作笔记本电脑上执行此操作时,它与完全相同版本的节点和 npm 没有任何问题
解决方案
只是给大家的更新。它现在起作用了。我所做的只是第四次重新安装 nodejs,仅此而已。0 有意义。无论如何,谢谢你的回答,不胜感激。
推荐阅读
- mysql - MYSQL:SELECT 1 from table1 where Id = 1 vs SELECT EXISTS(SELECT 1 from table1 where Id = 1)
- postgresql - Postgres:使用提取大小进行事务隔离
- oracle11g - oracle 中是否有临时可用的内置表或表空间?
- javascript - 无法在所有画布上上传图像
- android - RecyclerView 将图像设置在错误的位置
- javascript - 使用 VSCode 将常量重构为惰性常量
- arrays - 如何在反应表的行中呈现数组数据
- java - RestTemplate 与自定义 ConnectionPool?
- angular - 带有远程访问的角度生产?
- kubernetes - Kubernetes Cronjob 在 GKE 中使用临时卷