Skip to content

Commit 9fb109e

Browse files
committed
Fix ESM module error in CI by adding type: module
Add "type": "module" to package.json to fix the ERR_REQUIRE_ESM error that was occurring in GitHub Actions CI. The error occurred because Vite 7+ is ESM-only and requires Node.js to treat files as ES modules. Without "type": "module", Node.js defaults to CommonJS, causing the error when trying to load vite.config.ts. This fix ensures: - Vite config loads correctly as an ES module - Tests with coverage work in CI - Build process succeeds in all environments Verified locally: - pnpm test:coverage --run passes with 87.2% coverage - pnpm build succeeds
1 parent a4678e7 commit 9fb109e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "mathjojo",
33
"version": "0.1.0",
44
"private": true,
5+
"type": "module",
56
"dependencies": {
67
"katex": "^0.16.2",
78
"latex.css": "^1.8.0",

0 commit comments

Comments
 (0)