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

Typescript compile successful but error on running the app #204

Closed
Zoro-6191 opened this issue Feb 23, 2022 · 1 comment
Closed

Typescript compile successful but error on running the app #204

Zoro-6191 opened this issue Feb 23, 2022 · 1 comment

Comments

@Zoro-6191
Copy link

const ora_1 = __importDefault(require("ora"));
                              ^

Error [ERR_REQUIRE_ESM]: require() of ES Module D:\Git\node_modules\ora\index.js from D:\Git\build\index.js not supported.
Instead change the require of D:\Git\node_modules\ora\index.js in D:\Git\build\index.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (D:\Git\build\index.js:20:31) {
  code: 'ERR_REQUIRE_ESM'
}

Earlier I read that chalk had similar issue, but downgrading to a certain version helped. However can't find anything similar for ora

@sindresorhus
Copy link
Owner

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

You can also use version 5 if you need CommonJS support.

Repository owner locked as resolved and limited conversation to collaborators Feb 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants