MuratTuz / FMT_Issues

This is secondary repo for FMT project private repository
0 stars 0 forks source link

morgan deprecated default format: use combined format node_modules/esm/esm.js:1:278827 #2 #2

Open MuratTuz opened 3 years ago

MuratTuz commented 3 years ago

node.js morgan and esm middleware coflict. When i start to use esm package for ES6 import syntax, i got this warning saying that use combined format in morgan. However, i changed morgen logger from 'dev' to 'combined' but I still get the same warning:

morgan deprecated default format: use combined format node_modules/esm/esm.js:1:278827

Here old and new codes after usage of esm package.

app.js:

import express from "express";
import logger from "morgan";
const app = express();
app.use(logger('combined'));  // old version app.use(logger('dev'));

package.json:

{
  "name": "fmt-backend",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "start": "nodemon -r esm app.js dotenv/config dotenv_config_path=/.env"
  },
  "dependencies": {
    "cookie-parser": "~1.4.4",
    "debug": "~2.6.9",
    "dotenv": "^10.0.0",
    "esm": "^3.2.25",
    "express": "~4.16.1",
    "http-errors": "^1.8.0",
    "morgan": "~1.9.1",
    "mysql2": "^2.2.5",
    "nodemon": "^2.0.7",
    "sequelize": "^6.6.2"
  }
}
suleymanak006 commented 3 years ago

github very usefull programme for developers suleyman

ghost commented 3 years ago

Now I don't know about the subject. I can contribute later.

sonercxt commented 3 years ago

I will solve this problem in a year Omer N

HakanBagdat commented 3 years ago

I think I have completed my homework

aysedo commented 3 years ago

This should only display if you're trying to get the deprecated morgan.default property, though. I'll need to dig in to see what is going on. I have no idea =) Ayse

Mesutasci commented 3 years ago

Hi everybody.

emrebudakk commented 3 years ago

I think my work is finish Huseyin Budak

esat1265 commented 3 years ago

i have to learn this useful website

Tugbaasci commented 3 years ago

i want to solve this problem but not yet

MuratGuld commented 3 years ago

1) app.use(morgan("dev")) 2) changing the import statement to require I found some solution experiments on the internet. I don't know if it will work. murat guldibi

ysfogz commented 3 years ago

It's a difficult question to pose to me right now. I have to work more. yusuf o.

recepdogan88 commented 3 years ago

I am new in this field.

emreavcia commented 3 years ago

not a piece of cake to master in IT, but who knows maybe one day i ll be able to make a tangible contribution to a comprehensive project here. wish you all success

tepeevren commented 3 years ago

Hi, this is example of github. I hope we will learn this github clearly. Evren TEPE

mehtapy commented 3 years ago

i wonder if the problem will be solved

mustafa0cihan commented 3 years ago

I am looking forward to the solution of the problem.

asg1584 commented 3 years ago

I couldn't find a slogan. Ahmet Salih Gunes

arifoglu commented 3 years ago

Have you tried turn off on ?I just know this.

rdogan7106 commented 3 years ago

I will give you an answer shortly

n729207 commented 3 years ago

I pray you find a solution.

tolgaevrim commented 3 years ago

I am a student, it is too early for comment on the solution TolgaE.

Volkany commented 3 years ago

God will help you

Ferhat68 commented 3 years ago

I have a big problem

istemiz commented 3 years ago

It's very helpful for me. thanks

hpeltek commented 3 years ago

Very interesting. Halit Peltek