简体   繁体   English

运行 npm start 时,要启动反应项目,我会在终端上收到以下消息

[英]when running npm start, to start a react project I get the following messages on the terminal

When running npm start , to start a react project I get the following messages on the terminal:运行npm start ,要启动反应项目,我会在终端上收到以下消息:

npm ERR! npm 错误! code ENOENT npm ERR!代码 ENOENT npm ERR! syscall open npm ERR!系统调用打开 npm ERR! path /Users/eraldomaia/package.json npm ERR!路径 /Users/eraldomaia/package.json npm ERR! errno -2 npm ERR!错误号 -2 npm 错误号! enoent ENOENT: no such file or directory, open '/Users/eraldomaia/package.json' npm ERR! enoent ENOENT: 没有那个文件或目录,打开'/Users/eraldomaia/package.json' npm ERR! enoent This is related to npm not being able to find a file. enoent 这与 npm 无法找到文件有关。 npm ERR! npm 错误! enoent恩恩特

npm ERR! npm 错误! A complete log of this run can be found in: npm ERR!可以在以下位置找到此运行的完整日志:npm ERR! /Users/eraldomaia/.npm/_logs/2020-02-29T15_23_08_741Z-debug.log /Users/eraldomaia/.npm/_logs/2020-02-29T15_23_08_741Z-debug.log

I do not know what to do!我不知道该怎么办!

How can I solve this?我该如何解决这个问题?

This is because npm is unable to find package.json in the directory where you are running npm start .这是因为 npm 无法在您运行npm start的目录中找到 package.json 。 Make sure your current working directory is the one where the project is actually cloned / bootstrapped.确保您当前的工作目录是项目实际克隆/引导的目录。

您必须在项目的根文件夹( de package.json 所在的位置)运行npm start

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

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