reactjs - 发生意外错误:“https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz:请求失败\“404 Not Found\”
问题描述
当我尝试使用 create-react-app 创建一个新的 react 应用程序时,我得到了以下信息:
» npx create-react-app my-order
Creating a new React app in /Users/ian/myproject/my-order.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.19.0
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz: Request failed \"404 Not Found\"".
info If you think this is a bug, please open a bug report with the information provided in "/Users/ian/myproject/my-order/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts --cwd /Users/ian/myproject/my-order has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Done.
而我的本地环境信息是这样的:
» npx create-react-app --info
Environment Info:
System:
OS: macOS 10.14.6
CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Binaries:
Node: 11.1.0 - /usr/local/bin/node
Yarn: 1.19.0 - ~/.yarn/bin/yarn
npm: 6.7.0 - /usr/local/bin/npm
Browsers:
Chrome: 80.0.3987.100
Firefox: 72.0.2
Safari: 12.1.2
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: 2.1.1
有人知道这里发生了什么吗?
解决方案
在你的命令中试试这个: - yarn cache clean - yarn 它可能会工作......
推荐阅读
- java - 当我单击android中的长按按钮时,我正在尝试增加数字
- mysql - mysql获取列名的最大值
- firebase - 在用户属性更改时更新远程配置数据
- javascript - 将两个 div 与右侧的图像居中对齐
- linux - 当我在远程服务器上运行脚本时,它会在本地机器上启动
- php - 规则错误?只有列表中的第一项用于生成事件
- symfony - 如何在 Symfony 安全上正确设置两种类型的用户和防火墙?
- android - Seekbar Thumb 问题上的动态文本
- python - 需要将 dic 分配给 Pandas Dataframe
- algorithm - 扫描矩阵的元素