lit / lit/lit

[labs/eleventy-plugin-lit] VM tests are failing on GitHub actions

Open
#5,043 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
21.8k
Forks
1.1k
Avg merge
18h 25m
Merged PRs (30d)
2

Description

### Which package(s) are affected?

Eleventy Plugin (@lit-labs/eleventy-plugin-lit)

### Description

The error looks like:

```
eleventy-plugin-test.js
Error running command: NODE_OPTIONS=--experimental-vm-modules eleventy --config .eleventy.cjs
(node:9830) ExperimentalWarning: VM Modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] module is already linked (via Error)
[11ty]
[11ty] Original error stack trace: Error: module is already linked
[11ty] at [kLink] (node:internal/vm/module:363:19)
[11ty] at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[11ty] at async node:internal/vm/module:354:13
Error running command: eleventy --config .eleventy.cjs

┌───────────────────── ERROR ─────────────────────┐
│ │
│ @lit-labs/eleventy-plugin-lit requires Node │
│ version 12.16.0 or higher, and that eleventy is │
│ launched with a special environment variable │
│ to enable an experimental feature: │
│ │
│ NODE_OPTIONS=--experimental-vm-modules eleventy │
│ │
└─────────────────────────────────────────────────┘

[11ty] Eleventy CLI Fatal Error: (more in DEBUG output)
[11ty] 1. Error processing the `configFunction` plugin (via EleventyPluginError)
[11ty] 2. @lit-labs/eleventy-plugin-lit requires that eleventy be launched with NODE_OPTIONS=--experimental-vm-modules (via Error)
[11ty]
[11ty] Original error stack trace: Error: @lit-labs/eleventy-plugin-lit requires that eleventy be launched with NODE_OPTIONS=--experimental-vm-modules
[11ty] at configureVm (/home/runner/work/lit/lit/packages/labs/eleventy-plugin-lit/index.js:127:15)
[11ty] at Object.configFunction (/home/runner/work/lit/lit/packages/labs/eleventy-plugin-lit/index.js:186:17)
[11ty] at UserConfig._executePlugin (/home/runner/work/lit/lit/node_modules/@11ty/eleventy/src/UserConfig.js:373:14)
[11ty] at TemplateConfig.processPlugins (/home/runner/work/lit/lit/node_modules/@11ty/eleventy/src/TemplateConfig.js:192:25)
[11ty] at TemplateConfig.mergeConfig (/home/runner/work/lit/lit/node_modules/@11ty/eleventy/src/TemplateConfig.js:276:10)
[11ty] at TemplateConfig.getConfig (/home/runner/work/lit/lit/node_modules/@11ty/eleventy/src/TemplateConfig.js:122:26)
[11ty] at new Eleventy (/home/runner/work/lit/lit/node_modules/@11ty/eleventy/src/Eleventy.js:74:39)
[11ty] at Object. (/home/runner/work/lit/lit/node_modules/@11ty/eleventy/cmd.js:70:16)
[11ty] at Module._compile (node:internal/modules/cjs/loader:1738:14)
[11ty] at Object..js (node:internal/modules/cjs/loader:1871:10)
```

### Reproduction

n/a

### Workaround

I'm disabling the VM tests

### Is this a regression?

Yes. This used to work, but now it doesn't.

### Affected versions

n/a

### Browser/OS/Node environment

Node 24

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the failing eleventy-plugin-test.js VM test on GitHub Actions under Node 24, then read packages/labs/eleventy-plugin-lit/index.js around configureVm at lines 127 and 186. Compare the failure involving “module is already linked” with the current test setup and the workaround that disables VM tests. Done means the VM tests pass in GitHub Actions without disabling them.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript, node.js
Domain
ci-cd, devops, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.