0

There is an error in running mysql (node.js) file in cmd. It is showing module not found...

What is the problem occurring?

Please help....

The error:-

C:\Users\mhars>node trial.js
node:internal/modules/cjs/loader:926
  throw err;
  ^

Error: Cannot find module 'C:\Users\mhars\trial.js'
←[90m    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:923:15)←[39m
←[90m    at Function.Module._load (node:internal/modules/cjs/loader:768:27)←[39m
←[90m    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)←[39m
←[90m    at node:internal/main/run_main_module:17:47←[39m {
  code: ←[32m'MODULE_NOT_FOUND'←[39m,
  requireStack: []
}
2
  • Does this answer your question? Cannot find module `mysql` node.js Commented Mar 29, 2021 at 10:33
  • Could you please update your question with the exact command line output? That'd be helpful. Commented Mar 29, 2021 at 10:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.