evanw / evanw/esbuild

Uncaught Error: Dynamic require of "util" is not supported

Open
#2,113 2 comments 5 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
40.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

when i use `format: 'esm'` config at dev watch model

```
at unsupportedIterableToArray.js:9
at ../../.eden-mono/temp/node_modules/.pnpm/object-inspect@1.12.0/node_modules/object-inspect/util.inspect.js (util.inspect.js:1)
at __require22 (index.tsx:4)
at ../../.eden-mono/temp/node_modules/.pnpm/object-inspect@1.12.0/node_modules/object-inspect/index.js (index.js:68)
at __require22 (index.tsx:4)
at ../../.eden-mono/temp/node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js (index.js:5)
at __require22 (index.tsx:4)
at ../../.eden-mono/temp/node_modules/.pnpm/qs@6.10.3/node_modules/qs/lib/stringify.js (stringify.js:3)
at __require22 (index.tsx:4)
at ../../.eden-mono/temp/node_modules/.pnpm/qs@6.10.3/node_modules/qs/lib/index.js (index.js:3)
```

![image](https://user-images.githubusercontent.com/4150641/159117950-4ed15358-feb0-4e48-a580-b35abb3620f3.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with format: 'esm' enabled in dev watch mode and trace the dependency path through unsupportedIterableToArray.js, util.inspect.js, and index.tsx. Confirm completion when that configuration no longer raises the uncaught dynamic-require error shown in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.