fkling / astexplorer

A web tool to explore the ASTs generated by various parsers.
https://astexplorer.net/
MIT License
6.04k stars 711 forks source link

[PROJECT BUG] Module not found: Error: Can't resolve '@swc/wasm-web/wasm.js' in... #711

Open ericmorand opened 5 months ago

ericmorand commented 5 months ago

Describe the bug

When executing npm run build-dev, the following error is thrown, among multiple others of the same kind:

ERROR in ./src/parsers/js/swc.js
Module not found: Error: Can't resolve '@swc/wasm-web/wasm.js' in '/home/[REDACTED]/Projects/astexplorer/website/src/parsers/js'

Obviously, the deployed browser application crashes accordingly.

This happens with every version of node from 12 to 18 but probably also happens with 19 to 21.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'website'
  2. Run npm run build-dev

Expected behavior

The webpack bundle is successfully built.