We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I wanted to test your module, but unexpectedly it won't function. By creating a new instance of the class 'Watchdog' with
var Watchdog = require('watchdog'); const timeout = 5000; const dog = new Watchdog(timeout);
I get the following Error: TypeError: Watchdog is not a constructor
TypeError: Watchdog is not a constructor
Even by testing it with RunKit directly from the npm page (https://npm.runkit.com/watchdog) the error appears.
Maybe the problem appears cause of the mixing of typescript module and JavaScript Code...
The text was updated successfully, but these errors were encountered:
var Watchdog = require('watchdog') will not work because Watchdog is an ES6 module.
var Watchdog = require('watchdog')
Your code should be able to work after any one the following changes:
var Watchdog = require('watchdog'); const timeout = 5000; - const dog = new Watchdog(timeout); + const dog = new Watchdog.Watchdog(timeout);
- var Watchdog = require('watchdog'); + const { Watchdog } = require('watchdog'); const timeout = 5000; const dog = new Watchdog(timeout);
- var Watchdog = require('watchdog'); + import { Watchdog } from 'watchdog'; const timeout = 5000; const dog = new Watchdog(timeout);
var watchdog = require("watchdog") const timeout = 5000; const dog = new watchdog.Watchdog(timeout);
Sorry, something went wrong.
No branches or pull requests
Hi,
I wanted to test your module, but unexpectedly it won't function.
By creating a new instance of the class 'Watchdog' with
I get the following Error:
TypeError: Watchdog is not a constructor
Even by testing it with RunKit directly from the npm page (https://npm.runkit.com/watchdog) the error appears.
Maybe the problem appears cause of the mixing of typescript module and JavaScript Code...
The text was updated successfully, but these errors were encountered: