Skip to content

fix(parser): invalid main entrypoint in package.json#13767

Merged
Boshen merged 1 commit intooxc-project:mainfrom
AriPerkkio:main
Sep 15, 2025
Merged

fix(parser): invalid main entrypoint in package.json#13767
Boshen merged 1 commit intooxc-project:mainfrom
AriPerkkio:main

Conversation

@AriPerkkio
Copy link
Contributor

@AriPerkkio AriPerkkio commented Sep 15, 2025

In #13432 the filename was changed but main remained as is. I'm now seeing following error in Vitest:

⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯
Error: Failed to resolve entry for package "oxc-parser". The package may have incorrect main/module/exports specified in its package.json.
1  |  import { parse as BabelParser } from "@babel/parser";
2  |  import { parse as AcornParser } from "acorn";
3  |  import { parseSync as OxcParser } from "oxc-parser";
   |                                          ^
4  |  import { parseAst as ViteParser } from "vite";
5  |  import { expectTypeOf, test } from "vitest";
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

https://github.com/AriPerkkio/ast-v8-to-istanbul/actions/runs/17722503037/job/50357275013?pr=86

See errors from https://publint.dev/oxc-parser@0.88.0.

Signed-off-by: Ari Perkkiö <ari.perkkio@gmail.com>
Copilot AI review requested due to automatic review settings September 15, 2025 05:02
@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 15, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an incorrect package entrypoint in the oxc-parser package.json file. The main entry was pointing to a non-existent index.js file when it should point to index.mjs, causing module resolution failures in consuming applications.

  • Updates the main entrypoint from index.js to index.mjs to match the actual output file

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions github-actions bot added the C-bug Category - Bug label Sep 15, 2025
@Boshen Boshen merged commit 341791e into oxc-project:main Sep 15, 2025
18 checks passed
This was referenced Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants