it’s my firt time using node.js today and I was faced with this issue. When trying to run hello.js in my terminal, I get this message :
Error: Cannot find module ‘/Users/antoinelafonta/hello.js’
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47 {
code: ‘MODULE_NOT_FOUND’,
requireStack:
It’s running fine when using the VsCode terminal. I’ve tried to set up a PATH to the Visual Studio App, but the message stays the same.
Any ideas ?