通过设置代理,可以使用create-react-app在公司防火墙后面工作.
我已经在npm和yarn上设置了代理,但这是我在尝试创建 – react-app my-app时看到的:
Creating a new React app in F:\react\my-app. Installing packages. This might take a couple of minutes. Installing react,react-dom,and react-scripts... You appear to be offline. Falling back to the local Yarn cache. yarn add v0.23.4 info No lockfile found. [1/4] Resolving packages... error Couldn't find any versions for "react" that matches "latest" in our cache. Possible versions: "" info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command. Aborting installation. yarnpkg add --exact --offline react react-dom react-scripts has Failed. Deleting generated file... package.json Deleting my-app / from F:\react Done.
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。