Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6046

Why the NodeJs stop when I put call to Morgan [closed]

$
0
0

I'm trying to install Morgan in NodeJs, but it's not working, when I change my app.js, I put the request to Morgan, the application stops.

If I remove the call to Morgan, the app work. My Node.Js version is: v20.12.1

I expected the application to run

I install the Morgan with ("morgan": "^1.10.0"): npm install morgan.

My app.js:

require('dotenv').config()const consign = require('consign')()const passport = require('passport')const express = require('express');var morgan = require('morgan')const parser = require('body-parser')const cors = require('cors')const sentry = require('@sentry/node')require('@sentry/tracing')const tracker = require('./track.js')const app = express();app.use(morgan('combined'))app.get('/', function (req, res) {  res.send('hello, world!')})

Viewing all articles
Browse latest Browse all 6046

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>