nodejs module.js:340 error: cannot find module

前端 未结 21 580
别那么骄傲
别那么骄傲 2021-02-02 06:39

I installed nodejs in C:\\Program Files (x86)\\nodejs

then I created a .js file and saved it in my desktop just to output \'hello world\' in the console:



        
21条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-02 07:01

    Hi fellow Phonegap/Cordova/Ionic developers,

      I solved this issue by doing the following
    
      1. C: drive -> Users -> "username" eg. john -> AppData -> Roaming
    
      2. Inside the "Roaming" folder you need to delete both "npm" and "npm-cache" 
           folder.
    
      3. Now build your project, and it should work
    

    Happy coding!!!

提交回复
热议问题