Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

When I run this code: const mysql = require('mysql2'); const express = require('express'); const app = express() const port = 3000 app.listen(port,() => { console.log(`Listening

When I run this code:

const mysql = require('mysql2');

const express = require('express');

const app = express()

const port = 3000

app.listen(port,() => {

console.log(`Listening on http://localhost:${port}...`);

I get this error :

a.m.@Maxwells-MacBook-Pro-2 sql % node .\app.js node:internal/modules/cjs/loader:936 throw err; ^

Error: Cannot find module '/Users/a.m./Desktop/sql/.app.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:81:12) at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: []

why?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Combinatorial Testing In Cloud Computing

Authors: Wei-Tek Tsai ,Guanqiu Qi

1st Edition

9811044805, 978-9811044809

More Books

Students also viewed these Programming questions

Question

What opportunities exist for raises and advancement?

Answered: 1 week ago

Question

-x/2 x/4 If A = -x/2 and A-1 =6 then x equals

Answered: 1 week ago