I am having this issue when trying to run node index.js
in my terminal on VSC.
This is the error,
[Try the new cross-platform PowerShell https://aka.ms/pscore6
PS Z:\01 Code notes> node index.js
node:internal/modules/cjs/loader:944
throw err;
^
Error: Cannot find module 'Z:\01 Code notes\index.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)
at Function.Module._load (node:internal/modules/cjs/loader:774:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
PS Z:\01 Code notes> ][1]
I have tried so many different things. I tried all the suggested fixes on these pages, Node MODULE_NOT_FOUND
Why does VsCode NPM throw a module not found error?
https://github.com/Microsoft/vscode/issues/65893
Any suggestions?