Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Can not use @oxc-parser/wasm without error #2828

Closed
Saeid-Za opened this issue Mar 26, 2024 · 4 comments
Closed

Bug: Can not use @oxc-parser/wasm without error #2828

Saeid-Za opened this issue Mar 26, 2024 · 4 comments

Comments

@Saeid-Za
Copy link
Contributor

Hello ! I've been trying to use @oxc-parser/wasm but there is an error.

Error: Cannot find package 'test/node_modules/@oxc-parser/wasm/package.json' imported from 'test/a.mjs'

To reproduce the error:

  1. run npm i @oxc-parser/wasm in an empty folder
  2. create a test.mjs file, having this content:
import {parseSync} from "@oxc-parser/wasm"
console.log(parseSync)
  1. Try to run the code.
@Boshen
Copy link
Member

Boshen commented Mar 27, 2024

The state of wasm build is really confusing.

As stated in the README

This package is built with wasm-pack build --release --target web for bundler (webpack / vite) consumption. Checkout oxc-parser for usage in node.js.

@Boshen
Copy link
Member

Boshen commented Mar 27, 2024

The original issue is about making it work on stackbliz, pinging @Brooooooklyn who may know more.

@Boshen
Copy link
Member

Boshen commented Mar 29, 2024

We may need to publish more builds (wasi, node.js target) in the near future, but I'll close this for now as I don't have the bandwidth.

@Boshen Boshen closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2024
@Boshen Boshen reopened this Apr 8, 2024
Boshen pushed a commit that referenced this issue Apr 8, 2024
@Boshen
Copy link
Member

Boshen commented Apr 8, 2024

Closed by #2916

Released v0.1.0 https://www.npmjs.com/package/@oxc-parser/wasm

@Boshen Boshen closed this as completed Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants