简体   繁体   中英

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 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM