Error [ERR_REQUIRE_ESM]: require() of ES Module E:\~\node_modules\clipboardy\index.js not supported.
Harshita-mindfire opened this issue ยท 3 comments
Harshita-mindfire commented
I'm working on a typescript project and receiving error from clipboardy
[ERR_REQUIRE_ESM]: require() of ES Module from not supported.
Instead change the require of index.js in... to a dynamic import() which is available in all CommonJS modules.
my code:
import clipboard from 'clipboardy`
clipboard.writeSync('...');
Harshita-mindfire commented
duplicate
jdthorpe commented
Duplicate of what?