C:\Users\Administrator>npm install
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\Administrator/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\Administrator\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! D:\nodejs\node_cache\_logs\2024-09-29T15_50_37_869Z-debug-0.log
这句话的意思大概是 没有 package.json 这样的文件或目录,打开’D:\Node\package.json’,
解决办法:
- 先执行 npm init -f 再安装npm install
-
npm WARN using --force Recommended protections disabled. Wrote to C:\Users\Administrator\package.json: { "name": "administrator", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC" }
阅读全文
原文链接:https://xdyl.club/130,转载请注明出处~~~
评论0