how to import and use debug using es6 import syntax
See original GitHub issueimport Debug from 'debug';
const debug = Debug('myapp');
I am trying to above syntax, app runs as expected but no debug output is shown
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
how to import and use debug using es6 import syntax #692
import Debug from 'debug'; const debug = Debug('myapp'); I am trying to above syntax, app runs as expected but no debug output is...
Read more >Setup and debug Jest to use ES6 imports in Node v12.x.x
This guide navigates the maze of Jest configurations when trying to use ES6 imports in v12 of Node.
Read more >ES6 module import is not defined during debugger
I threw a debugger in my main.js to see if I was importing correctly, but Chrome's console kept yelling that the module I...
Read more >How to enable ES6 (and beyond) syntax with Node and Express
js /** * Module dependencies. */ import app from '../app'; import debugLib from 'debug'; import http from 'http'; const debug = debugLib ......
Read more >Debugging ES6 Code in Node.js - Atomic Spin
Option 1: The Built-In Debugger. Let's take the example from the aforementioned post, but modify it with some ES6 syntax: JavaScript. import ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This doesn’t make sense @Qix- , the question is how to import using ES6 import syntax, not how to use the lib. In the readme they only teach how to import it using require.
BTW, I’m also looking for this answer
import Debug from “debug”; const debug = Debug(“MyApp”);
// then to use debug(“Something happened”);