Closed kaihaase closed 3 years ago
I import capture-website (i2.0.2) in a TypeScript project via: import captureWebsite from 'capture-website';
capture-website
import captureWebsite from 'capture-website';
When starting the application via ts-node (10.0.0) I get the following error message:
ts-node
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: ... /node_modules/capture-website/index.js require() of ES modules is not supported.
I tried it in the following Node.js versions on macOS (11.4):
I also tried to import via: import * as captureWebsite from 'capture-website';
import * as captureWebsite from 'capture-website';
https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
I import
capture-website
(i2.0.2) in a TypeScript project via:import captureWebsite from 'capture-website';
When starting the application via
ts-node
(10.0.0) I get the following error message:I tried it in the following Node.js versions on macOS (11.4):
I also tried to import via:
import * as captureWebsite from 'capture-website';