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

issue-direct-credential-express doesn't start correctly #160

Open
jrogado opened this issue Apr 17, 2024 · 0 comments
Open

issue-direct-credential-express doesn't start correctly #160

jrogado opened this issue Apr 17, 2024 · 0 comments

Comments

@jrogado
Copy link

jrogado commented Apr 17, 2024

When starting the issue-direct-credential-express app I get the following error (with node v20.11.0):

D:\Archive\Projects\mattr\direct-credentials\node_modules\ts-node\dist\index.js:851
return old(m, filename);
^
Error [ERR_REQUIRE_ESM]: require() of ES Module D:\Archive\Projects\mattr\direct-credentials\node_modules\got\dist\source\index.js from D:\Archive\Projects\mattr\direct-credentials\src\app.ts not supported.
Instead change the require of index.js in D:\Archive\Projects\mattr\direct-credentials\src\app.ts to a dynamic import() which is available in all CommonJS modules.
at require.extensions. [as .js] (D:\Archive\Projects\mattr\direct-credentials\node_modules\ts-node\dist\index.js:851:20)
at Object. (D:\Archive\Projects\mattr\direct-credentials\src\app.ts:50:31)
at m._compile (D:\Archive\Projects\mattr\direct-credentials\node_modules\ts-node\dist\index.js:857:29) {
code: 'ERR_REQUIRE_ESM'
}

The issue is signaled in the "ts-node" index.js file, but is related to some other problem in the "got" library. It also refers to a require in an inde.js file which is probably the transpiled result of a typescript file, or a mismatch in the libary versions.

I cannot trace the correct origin of the problem, and cannot run the example. Any help is welcome.

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

No branches or pull requests

1 participant