Problems with my visual studio code

Problems with my visual studio code


Please!! i need some help to fix my visual studio code, when i write in the terminal the command //node index.js// to see the output of my code the terminal shows me

throw err;

Error: Cannot find module ‘/home/veronica/js-exercices/index.js’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:279:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:752:3)//

and when i run the code in vim all is ok!!


Do you have the directory opened in VS Code? Or in your commands did you use cd your-project-directory before running?


I’m working in VS Code, it is open! I only opened vim to check if the error was due to syntax o something else with the code… yesterday VS Code works i do not know what happens… ¯_(ツ)_/¯


What OS are you using? How are you opening a terminal? From within VS Code or externally?


I’m using Ubuntu… the terminal that i’m using is within VSCode (ctrl + shift `)