Skip to content
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

fails to load with ink v4 #12

Closed
isaacs opened this issue Jun 5, 2023 · 1 comment
Closed

fails to load with ink v4 #12

isaacs opened this issue Jun 5, 2023 · 1 comment

Comments

@isaacs
Copy link

isaacs commented Jun 5, 2023

> import('ink-link').then(console.log)
Promise {
  <pending>,
  [Symbol(async_id_symbol)]: 160,
  [Symbol(trigger_async_id_symbol)]: 144
}
> /Users/isaacs/dev/tapjs/tapjs/node_modules/ink-link/dist.js:4
var _ink = require("ink");
           ^
Uncaught:
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/isaacs/dev/tapjs/tapjs/node_modules/ink/build/index.js from /Users/isaacs/dev/tapjs/tapjs/node_modules/ink-link/dist.js not supported.
Instead change the require of index.js in /Users/isaacs/dev/tapjs/tapjs/node_modules/ink-link/dist.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/Users/isaacs/dev/tapjs/tapjs/node_modules/ink-link/dist.js:4:12) {
  code: 'ERR_REQUIRE_ESM'
@tapjs/tapjs@ /Users/isaacs/dev/tapjs/tapjs
└─┬ @tapjs/reporter@0.0.0-0 -> ./src/reporter
  └── ink-link@2.0.1

Looks like it needs to be updated to use ESM.

sindresorhus added a commit that referenced this issue Jun 10, 2023
sindresorhus added a commit that referenced this issue Jun 10, 2023
@isaacs
Copy link
Author

isaacs commented Jun 10, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant