简体   繁体   English

每当我尝试在 Visual Studio 代码上运行“npm install”时出现错误

[英]I get an error whenever i try to run "npm install" on visual studio code

whenever I run npm install I get this error I am on node version 18.9.1 and I have tried every single solution please help每当我运行 npm 安装时,我都会收到此错误,我使用的是节点版本 18.9.1,并且我已经尝试了每一个解决方案,请帮助

'''npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\ASUS\OneDrive\Desktop\cw/package.json
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\ASUS\OneDrive\Desktop\cw\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent'''

npm install --force did the trick i also had to add type": "module", and also I was using got so instead of require() I used import npm install --force 成功了,我还必须添加 type":"module",而且我使用 got so 而不是 require() 我使用 import

暂无
暂无

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

相关问题 使用 Visual Studio 代码安装 npm 时出错 - Error when I use npm install with visual studio code 每当我尝试编译 javascript 代码时,都会出现语法错误 - Whenever I try to compile javascript code I get a syntax error 我正在尝试在可视代码中运行命令 npm install 但它向我显示了这个错误 - i am trying to run the command npm install in visual code but it is showing me this error 每当我尝试在 VScode 终端中运行 cypress run --record --key xxxx 时,都会收到一条错误消息 - I get an error message whenever I try to run the cypress run --record --key xxxx in VScode terminal 在 Visual Studio 的终端中使用 npm 启动时出现错误 - while using npm start in the terminal of visual studio I get an error 当我尝试使用npm我安装我的项目包时出现错误 - I get an error when I try to install my project packages with npm i 每当我尝试运行 Cypress Suite 时都会出现以下错误 - Getting below error whenever I try to run Cypress Suite 当我尝试在 Visual Studio Code 的终端中使用 Node.js 时,我收到“文档未定义”错误消息 - When I try to use Node.js in Visual Studio Code’s terminal, I get “document is not defined” error messages 当我尝试使用 npm 安装 Brain.js 时出现此错误 - I get this error when I try to install brain.js using npm 每次我尝试运行 NPM 安装终端都会抛出几个错误 - Everytime I Try To Run NPM Install Terminal throws several errors
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM