chirp icon indicating copy to clipboard operation
chirp copied to clipboard

Cannot find module 'morgan' at Function.Module._resolveFilename (module.js:469:15)

Open rochakravi opened this issue 7 years ago • 7 comments

I used git clone and then completed=> node app.js then found above error . I dnt have how to resolve this so that i can see working code . Can anyone please help me?.

rochakravi avatar Jul 08 '17 18:07 rochakravi

Hey,

Run this command from the node package file.

npm install morgan

To add this npm package to your local machine, type the above into your command line. You’ll notice a node_modules directory appear in your root where the package is now installed.

If you're having trouble installing packages, check out the helpful docs for installing npm packages locally

Your purpose will be served.

Thanks, Anonymous

On Jul 9, 2017 12:24 AM, "rochakravi" [email protected] wrote:

I used git clone and then completed=> node app.js then found above error . I dnt have how to resolve this so that i can see working code . Can anyone please help me?.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hwz/chirp/issues/41, or mute the thread https://github.com/notifications/unsubscribe-auth/ATWtjg6KLPlB_LDYVy0xv5GPcGXygHcpks5sL9B8gaJpZM4OR1fy .

sagarsrao avatar Jul 08 '17 20:07 sagarsrao

Now got below error

Error: failed to connect to [localhost:27017] at . (C:\Users\admin\Desktop\dabba\hwz\chirp\module-5\completed\node_modules\mongodb\lib\mongodb\connection\server.js:549:25) at emitThree (events.js:116:13) at emit (events.js:194:7) at . (C:\Users\admin\Desktop\dabba\hwz\chirp\module-5\completed\node_modules\mongodb\lib\mongodb\connection\connection_pool.js:150:15) at emitTwo (events.js:106:13) at emit (events.js:191:7) at Socket. (C:\Users\admin\Desktop\dabba\hwz\chirp\module-5\completed\node_modules\mongodb\lib\mongodb\connection\connection.js:533:10) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at emitErrorNT (net.js:1281:8)

On Sun, Jul 9, 2017 at 1:41 AM, SAGARSRAO [email protected] wrote:

Hey,

Run this command from the node package file.

npm install morgan

To add this npm package to your local machine, type the above into your command line. You’ll notice a node_modules directory appear in your root where the package is now installed.

If you're having trouble installing packages, check out the helpful docs for installing npm packages locally

Your purpose will be served.

Thanks, Anonymous

On Jul 9, 2017 12:24 AM, "rochakravi" [email protected] wrote:

I used git clone and then completed=> node app.js then found above error . I dnt have how to resolve this so that i can see working code . Can anyone please help me?.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hwz/chirp/issues/41, or mute the thread <https://github.com/notifications/unsubscribe-auth/ATWtjg6KLPlB_ LDYVy0xv5GPcGXygHcpks5sL9B8gaJpZM4OR1fy> .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hwz/chirp/issues/41#issuecomment-313878414, or mute the thread https://github.com/notifications/unsubscribe-auth/ATAiLH-qoe6FOU8luigGS3ZZ1IV3mAdtks5sL-KAgaJpZM4OR1fy .

-- ravi raj

rochakravi avatar Jul 10 '17 17:07 rochakravi

try changing the port number

Iman-ik1510048 avatar Apr 18 '18 10:04 Iman-ik1510048

internal/modules/cjs/loader.js:596 throw err; ^

Error: Cannot find module 'morgan' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15) at Function.Module._load (internal/modules/cjs/loader.js:520:25) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18)

I've tried installing with --save-dev and even globally but doesn't seem to work, always get this error at require.

rodcunha avatar Jul 13 '18 14:07 rodcunha

try npm link morgan

neydoo avatar Sep 11 '18 00:09 neydoo

@rodcunha Seems like mongoose-morgon also do the same thing. npm install mongoose-morgan Worked for me, and its showing loggers in console too

lakshmankotiki avatar Jun 19 '19 06:06 lakshmankotiki

I ran npm I morganand npm I Morgan --local but it never solved. I just tried npm link morgan and I was saved.

Wachiye avatar Sep 08 '20 08:09 Wachiye