简体   繁体   English

npm 从反应开始出错

[英]npm start err from react


** Visual Studio 2019 Developer Command Prompt v16.4.0 ** Copyright (c) 2019 Microsoft Corporation ** Visual Studio 2019 开发人员命令提示符 v16.4.0 ** 版权所有 (c) 2019 Microsoft Corporation


C:\\Users\\asdf\\Desktop\\scratch3\\create-react-app\\docusaurus\\website>npm start C:\\Users\\asdf\\Desktop\\scratch3\\create-react-app\\docusaurus\\website>npm start

@ start C:\\Users\\asdf\\Desktop\\scratch3\\create-react-app\\docusaurus\\website docusaurus start @ start C:\\Users\\asdf\\Desktop\\scratch3\\create-react-app\\docusaurus\\website docusaurus start

'docusaurus' is not recognized as an internal or external command, operable program or batch file. 'docusaurus' 不是内部或外部命令,也不是可运行的程序或批处理文件。 npm ERR! npm 错误! code ELIFECYCLE npm ERR!代码 ELIFECYCLE npm ERR! errno 1 npm ERR!错误号 1 npm 错误号! @ start: docusaurus start npm ERR! docusaurus startdocusaurus start npm ERR! Exit status 1 npm ERR!退出状态 1 npm ERR! npm ERR! npm 错误! Failed at the @ start script. @start 脚本失败。 npm ERR! npm 错误! This is probably not a problem with npm.这可能不是 npm 的问题。 There is likely additional logging output above.上面可能有额外的日志输出。

npm ERR! npm 错误! A complete log of this run can be found in: npm ERR!可以在以下位置找到此运行的完整日志:npm ERR! C:\\Users\\asdf\\AppData\\Roaming\\npm-cache_logs\\2019-12-25T05_50_44_042Z-debug.log C:\\Users\\asdf\\AppData\\Roaming\\npm-cache_logs\\2019-12-25T05_50_44_042Z-debug.log

C:\\Users\\asdf\\Desktop\\scratch3\\create-react-app\\docusaurus\\website>npm install [ C:\\Users\\asdf\\Desktop\\scratch3\\create-react-app\\docusaurus\\website>npm install [

我有同样的问题,它已解决

yarn upgrade docusaurus --latest

I had the same issue while working on an open-source project.我在从事开源项目时遇到了同样的问题。 I just did upgrade docusaurus to the latest version yarn upgrade docusaurus --latest and did yarn audit fix我只是将 docusaurus 升级到最新版本yarn upgrade docusaurus --latest并做了yarn 审计修复

make sure you are in the right directory ex.确保您位于正确的目录中。 project_name/src where the package.json file exists. project_name/src package.json 文件所在的位置。

$ rm yarn.lock
$ yarn install
$ yarn start

Some errors in the website (eg, missing page, incorrect syntax, and etc.) may cause this issue.网站中的某些错误(例如,缺页、语法错误等)可能会导致此问题。 You may force re-build, but the easiest workaround I found is to remove the lock and start over.您可以强制重新构建,但我发现最简单的解决方法是移除锁定并重新开始。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM