google / google/zx

[Bug]: TypeError: $(...) is not a function

Open
#1,389 2 comments 0 reactions 1 assignee Claimed by @antongolub View on GitHub
bug
Dominant language
JavaScript
Stars
45.7k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

### What happened?

I got this when I execute `zx --verbose TEST.md`

```
TypeError: $(...) is not a function
at file:///home/wighawag/dev/github/wighawag/template-ethereum-contracts/TEST.md.mjs:18:3
at ModuleJob.run (node:internal/modules/esm/module_job:377:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:671:26)
```

with the following README.md

(NOTE: i needed use backslash to escape the back ticks to show the readme here)

```markdown
# h1

paragraph

## h2

### h3

\`\`\`bash
echo "1"
\`\`\`

### h3

- item 1

\`\`\`bash
echo "2"
\`\`\`

### h3

\`\`\`bash
echo "4"
\`\`\`

```

### How it should work?

I expect to work fine,

### How to reproduce the bug?

see above markdown file

### Version

8.8.5

### What's OS kind?

Linux

### What JS runtime is used?

Node.js

### Runtime Version

24.11.1

### Error stack / relevant log output

```shell
TypeError: $(...) is not a function
at file:///home/wighawag/dev/github/wighawag/template-ethereum-contracts/TEST.md.mjs:18:3
at ModuleJob.run (node:internal/modules/esm/module_job:377:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:671:26)
```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.