“npm start”导致错误 - ENOENT:没有这样的文件或目录... package.json

Yas*_*INE 3 javascript node.js npm reactjs npx

我尝试使用 NPX 创建一个 React 应用程序。一切都很顺利,但是当我运行时npm start,出现以下错误:

$ npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\Administrateur.TEST\Desktop\reactProjects\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\Administrateur.TEST\Desktop\reactProjects\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrateur.TEST\AppData\Roaming\npm-cache\_logs\2020-07-19T22_43_34_181Z-debug.log
Run Code Online (Sandbox Code Playgroud)

小智 11

运行 npm start 时,确保您的终端在 package.json 所在的目录中打开