ReactJS,create-react-app 报错
ReactJS, create-react-app gets an error
我从我的控制台 运行 "create-react-app practise1" 命令,但出现错误。
我不明白为什么。你能帮助我吗?
通常我以前用它作为 "create-react-app react-complete-guide" 并且这个命令当时有效。
我分享了我作为屏幕截图获得的所有代码。
谢谢,
My Console screenshot
这不是 create-react-app
本身的直接问题,而是它需要的依赖项之一,require-from-string
。这个问题来自 npm 注册表本身,暂时,而不是 create-react-app
。请参阅 create-react-app 本身的 this about the npm registry status and this issue:
您可以做的是,如果您有另一个使用 create-react-app
引导的项目,您可以复制它并根据需要进行更改以启动新项目。或者 - 您可以等到 npm 注册表中的这个问题得到解决。这就是现代项目采用大量依赖项时会发生的情况 - 如果其中一些依赖项不可用,整个项目就会出现问题。
您的错误中可能应该有这样的文本:
error Received malformed response from registry for "timed-out". The
registry may be down.
目前 NPM 的一部分已关闭。 https://status.npmjs.org/
Identified - Several packages including "require-from-string" are currently unavailable. We are aware of the issue and are working to restore the affected user and packages. Please do not attempt to republish packages, as this will hinder our progress in restoring them.
Jan 6, 19:45 UTC
我从我的控制台 运行 "create-react-app practise1" 命令,但出现错误。 我不明白为什么。你能帮助我吗? 通常我以前用它作为 "create-react-app react-complete-guide" 并且这个命令当时有效。 我分享了我作为屏幕截图获得的所有代码。
谢谢,
My Console screenshot
这不是 create-react-app
本身的直接问题,而是它需要的依赖项之一,require-from-string
。这个问题来自 npm 注册表本身,暂时,而不是 create-react-app
。请参阅 create-react-app 本身的 this about the npm registry status and this issue:
您可以做的是,如果您有另一个使用 create-react-app
引导的项目,您可以复制它并根据需要进行更改以启动新项目。或者 - 您可以等到 npm 注册表中的这个问题得到解决。这就是现代项目采用大量依赖项时会发生的情况 - 如果其中一些依赖项不可用,整个项目就会出现问题。
您的错误中可能应该有这样的文本:
error Received malformed response from registry for "timed-out". The
registry may be down.
目前 NPM 的一部分已关闭。 https://status.npmjs.org/
Identified - Several packages including "require-from-string" are currently unavailable. We are aware of the issue and are working to restore the affected user and packages. Please do not attempt to republish packages, as this will hinder our progress in restoring them. Jan 6, 19:45 UTC