StackOverflow Questions for Tag: esmodules

Joel'-'
Joel'-'

Reputation: 734

Why does import of an ESM module in a CommonJS TypeScript project, result in ERR_REQUIRE_ESM?

Score: 16

Views: 25753

Answers: 4

Read More
usethe4ce
usethe4ce

Reputation: 23859

How to get vitest working with require of ES module

Score: 12

Views: 9975

Answers: 1

Read More
user25352238
user25352238

Reputation: 1

ReferenceError: exports is not defined in ES module scope while deploying

Score: 0

Views: 28

Answers: 0

Read More
haoyu wang
haoyu wang

Reputation: 1

Node v20.11.1 mjs Addressing path error "is not supported resolving ES modules imported"

Score: 0

Views: 100

Answers: 2

Read More
Henrique Ramos
Henrique Ramos

Reputation: 786

Jest error while trying to use with the file-type module. How can I fix "Cannot use import statement outside a module"?

Score: 5

Views: 1921

Answers: 1

Read More
Justin
Justin

Reputation: 653

Exporting a dynamically created object possible?

Score: 1

Views: 860

Answers: 0

Read More
Sudhakar J
Sudhakar J

Reputation: 67

Vitest require ESM Error. How do I get past this

Score: 2

Views: 112

Answers: 0

Read More
Mike M
Mike M

Reputation: 5132

SyntaxError: Unexpected token 'export' in Jest

Score: 0

Views: 92

Answers: 1

Read More
Mike M
Mike M

Reputation: 5132

Import `path` for Node reacts differently in NestJS

Score: 2

Views: 43

Answers: 2

Read More
Kerwen
Kerwen

Reputation: 552

How to dynamic import chai in CommonJS?

Score: 1

Views: 230

Answers: 1

Read More
marslfc
marslfc

Reputation: 11

Playwright - SyntaxError: Unexpected token 'export' - external npm package

Score: 1

Views: 547

Answers: 1

Read More
anon
anon

Reputation:

How to import via a URL using ES modules?

Score: 3

Views: 3282

Answers: 3

Read More
hedgehog90
hedgehog90

Reputation: 1511

Why doesn't the VS Code JS Debugger pause on uncaught exceptions in ES modules in NodeJS?

Score: 1

Views: 647

Answers: 1

Read More
NotBadri
NotBadri

Reputation: 1

ReferenceError: dirname is not defined in SvelteKit production build using mpd-api

Score: 0

Views: 61

Answers: 0

Read More
xkeshav
xkeshav

Reputation: 54084

How do I use both `require` and `import` in a Node.js script?

Score: -2

Views: 745

Answers: 1

Read More
Arman Lalani
Arman Lalani

Reputation: 21

CommonJS vs. ES Modules: this Behavior with call(null) and call(undefined)

Score: 2

Views: 68

Answers: 0

Read More
Bhrth
Bhrth

Reputation: 1

Dynamic require of 'https' is not supported error while generating cypress cucumber report in v 10

Score: 0

Views: 110

Answers: 1

Read More
Brayden Langley
Brayden Langley

Reputation: 1

How to properly mock import.meta.url in Jest with TypeScript and NodeNext module system?

Score: 0

Views: 646

Answers: 2

Read More
user13286
user13286

Reputation: 3085

Trouble setting up gulpfile.js using ES module

Score: 0

Views: 48

Answers: 0

Read More
Ardeshir Izadi
Ardeshir Izadi

Reputation: 1073

How does EcmaScript handle recursive modules?

Score: 1

Views: 73

Answers: 1

Read More
PreviousPage 1Next