-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
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
TypeError: Watchdog is not a constructor #18
Labels
Comments
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); RunKitvar watchdog = require("watchdog")
const timeout = 5000;
const dog = new watchdog.Watchdog(timeout); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: