我将项目表单下载到某个地方,然后运行'npm install',我得到了:
npm ERR! path /Users/<username>/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/Users/<username>/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
但是我已经检查了项目,那里有一个package.json文件:
/Users/username/Desktop/Directory/Projects/ProjectName/package.json
我需要使用npm init
创建另一个吗?
答案 0 :(得分:0)
cd到该目录npm install
,然后再次运行React.FunctionComponent
。