Diced Mango
Diced Mango

Reputation: 77

Node Server not working in console Node Js

I am trying to run local host in my browser utilising Node Js..

Node Server function is not working.

I have switched from mac to windows.

Is there different functions for terminal and command prompt?

C:\Users\Alex\Desktop\deeplake4> node server
module.js:471
throw err;
^

Error: Cannot find module 'body-parser'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\Alex\Desktop\deeplake4\server.js:5:18)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

C:\Users\Alex\Desktop\deeplake4>

Upvotes: 0

Views: 603

Answers (2)

Rohit Sharma
Rohit Sharma

Reputation: 47

 npm i body-parser --save

Above command will save this dependency in package.json

Upvotes: 1

kumbhani bhavesh
kumbhani bhavesh

Reputation: 2257

try this npm i --save body-parser

Upvotes: 1

Related Questions