Comments (3)
For anyone using the latest TypeScript and having this issue, I managed to counter it by doing the following:
- Under
tsconfig.json
, updatemodule
to"Node16"
- On my code, import Clipboardy by using
const clipboardy = (await import("clipboardy")).default
It's a bit of a hack, but seems to be the only way since TypeScript doesn't seem to recognize ESM correctly and tries to load them with require
instead of import
.
from clipboardy.
Please read the release notes.
I would wait upgrading until TS 4.5 I'd put as it has better ESM support.
from clipboardy.
my bad, sorry. thanks for the info and the awesome library.
from clipboardy.
Related Issues (20)
- Doesn't work on Safari 12 - TypeError: undefined is not an object (evaluating 'navigator.clipboard.writeText') HOT 2
- Couldn't find the `xsel` binary and fallback didn't work. HOT 1
- Uncaught Error: spawnSync clipboard_x86_64,exe ENOENT on Windows HOT 2
- Module not found: Error: Can't resolve 'node:process' in 'node_modules/clipboardy' HOT 1
- UncaughtSyntaxError: Unexpected token import HOT 1
- Loading with --experimental-modules HOT 2
- Doesn't works when I launch my app to Heroku HOT 3
- clipboardy do not support require ? HOT 1
- Error [ERR_REQUIRE_ESM]: require() of ES Module E:\~\node_modules\clipboardy\index.js not supported. HOT 3
- Cannot load module in JEST HOT 1
- windows wsl2 is slow with windows fallback binaries HOT 2
- Doesn't work with typescript HOT 4
- Having this error when run in Discord.JS Bot HOT 1
- i tried running clipboard thru heroku and this is the error i encounter HOT 1
- Powershell on Windows HOT 1
- Both xsel and fallback failed HOT 2
- Use Clipboard for Linux, Windows, macOS, and *BSD HOT 2
- Npmjs.org and GitHub 2.3.0 release packages checksum differs HOT 2
- Browser support in http (non-secure context) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clipboardy.