gpt4 book ai didi

javascript - 在 Linux 16.04 中使用 create-react-app 创建应用程序失败

转载 作者:太空宇宙 更新时间:2023-11-04 10:09:35 25 4
gpt4 key购买 nike

我正在尝试使用 create-react-app 创建新应用。
以下是错误。
请帮忙。提前致谢

➜ REACT create-react-app my-appCreating a new React app in /media/budi/Tjung/#TJUNG/REACT/my-app.Installing packages. This might take a couple of minutes.Installing react, react-dom, and react-scripts...yarn add v1.6.0info No lockfile found.[1/4] Resolving packages...error An unexpected error occurred: "http://registry.npmjs.org/react: > ETIMEDOUT".info If you think this is a bug, please open a bug report with the information provided in "/media/budi/Tjung/#TJUNG/REACT/my-app/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 /media/budi/Tjung/#TJUNG/REACT/my-app has failed.Deleting generated file... package.jsonDeleting generated file... yarn-error.logDeleting my-app / from /media/budi/Tjung/#TJUNG/REACTDone.

error image at CLI

最佳答案

在我看来像是网络问题。你可能在代理后面。如果是这样,请像这样在 npm 中配置您的代理

npm config set proxy http://proxy_host:port

对于 https

npm config set https-proxy http://proxy.company.com:8080

注意:https-proxy 的协议(protocol)不是 https,而是 http。

你也可以试试,

npm config set strict-ssl false

检查这个 SO answer

关于javascript - 在 Linux 16.04 中使用 create-react-app 创建应用程序失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49919839/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com