Resolve warning about externalised node dependencies
- Dominant language
- TypeScript
- Stars
- 38
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
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
Contributor guide
No contributing guide indexed for this repository
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.
Assessment
- Tech stack
- typescript, vite
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100