Question

Getting a weird error when I use "node site.js"

Posted June 24, 2017 1.3k views
Ubuntu Node.js JavaScript

So when I type in “node site.js” I get this very strange message that I have never gotten before

module.js:338
throw err;
^
Error: Cannot find module ‘mysql’
at Function.Module.resolveFilename (module.js:336:15)
at Function.Module.
load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/bot/site.js:1:75)
at Module.compile (module.js:460:26)
at Object.Module.
extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)

I dont even know where to began on this on I really need to get this project done. I will be able to share the .js files you need to look at just tell me what ones

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer
Submit an Answer