npm WARN enoent ENOENT: no such file or directory, open 'D:\····\package.json(找不到package.json)...
程序员文章站
2022-05-30 09:42:15
...
报错原因:
启动项目(或编译)的时候,找不到对应目录的package.json文件
解决办法:
npm init -f
init指令会询问一系列的问题,并将你的配置写成一个package.json文件。-f:会生成一个默认的package.json文件。
若还需要继续使用npm下载对应文件,继续使用命令:
npm install
推荐阅读
-
【webpac】npm ERR! enoent ENOENT: no such file or directory, open ‘E:\DEMO\webpack的使用-v2\package.json‘
-
排障集锦:九九八十一难之第十六难!-------------enoent ENOENT: no such file or directory, open ‘/root/package.json‘
-
vue 启动项目 enoent ENOENT: no such file or directory, open ‘D:\VueCode\package.json‘
-
若依 ENOENT: no such file or directory, open ‘***dg\package.json
-
npm WARN enoent ENOENT: no such file or directory, open 'D:\····\package.json(找不到package.json)...
-
安装RocketChat报错:npm WARN saveError ENOENT: no such file or directory, open ‘/tmp/bundle/programs/web.
-
FAQ:NodeJS安装报错npm WARN saveError ENOENT: no such file or directory, open 'G:\Node\package.json'
-
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\licc\package.json'