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 when running build on a NodeJS app #131

Open
VeniMitev opened this issue Nov 28, 2023 · 3 comments
Open

Issue when running build on a NodeJS app #131

VeniMitev opened this issue Nov 28, 2023 · 3 comments

Comments

@VeniMitev
Copy link

Receiving the following error when running "npm run build" on a TypeScript NodeJS app:

node_modules/long/umd/index.d.ts:1:18 - error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("../index.js")' call instead.

1 import Long from "../index.js";

Following the error logs, it all comes to this package. I'm not sure which one of my packages uses "long"

@japrescott
Copy link

japrescott commented Dec 4, 2023

currently having the exact same issue. Related to #125

@vivekjpatel
Copy link

Having same issue, anyone find the solution ? Thanks

@localhostd3veloper
Copy link

I am facing the same issue

The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("../index.js")' call instead.

it is being used by pnpm but I am not sure what's wrong

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

4 participants