Home > Software design >  Vs code 'c:\Users\Baej\Desktop\2 2=22\Strony\js\script.js'
Vs code 'c:\Users\Baej\Desktop\2 2=22\Strony\js\script.js'

Time:02-21

recently I tried to run js code in my vs code, but I hit on problem Error: Cannot find module 'c:\Users\Baej\Desktop\2 2=22\Strony\js\script.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: [] } and couldnt run it. I tried reinstalling vs code and node.js couple times but it didn't work. Now I am not able to run any code in vs code. Can somebody help me?

CodePudding user response:

You need to send your Javascript code . Seems like you tried to run some fileSystem module command and you got the path wrong because you probably used './' instead of '${__dirname}' which depends on where you are running your javascript file

CodePudding user response:

I deleted all node cache files, reinstalled VS and node, also removed all VS extensions and it finally helped. Im closing

  • Related