Resolve warning about externalised node dependencies

Open
#874 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript, vite

Research direction

Run npm run build and review the Vite warning for fs and path imported by packages/xpath/dist/expressionParser-i89CXh5o.js. Read the linked tree-sitter issue to determine whether an upstream fix is available; done means the build no longer emits these externalization warnings.

Written by the indexing model from the issue text.

Description

npm run build emits warnings about node dependencies fs and path which are used by tree-sitter.

@getodk/xforms-engine:build: [build:js   ] [plugin vite:resolve] Module "fs" has been externalized for browser compatibility, imported by "/home/gareth/src/garethbowen/central-frontend/packages/xpath/dist/expressionParser-i89CXh5o.js". See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.

The correct fix for this is upstream in the web-tree-sitter package: https://github.com/tree-sitter/tree-sitter/issues/5545

Dominant language
TypeScript
Stars
38
Forks
24
PR merge metrics
No merged PRs in 30d

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No 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.

More from getodk/web-forms

All issues in getodk/web-forms

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.