evidence
evidence copied to clipboard
Do not use `npx` to start `vite dev --port 3000` as a part of `evidence dev --open` command
Steps To Reproduce
I do not have NodeJS installed, as it is not needed. Bun works perfectly. Moreover, currently, evidence is not compatible with NodeJS 21 due to the ECharts issue (it is another issue, just more background on why I want to use Bun).
Environment
- Node version (
node -v): none - npm version (
npm -v): none - OS: macOS 14.2.1 (23C71).
- Browser: not relevant
- Database: not relevant
Expected Behavior
NodeJS is not required, env and runtime is respected .
Actual Behaviour
Error: /bin/sh: npx: command not found
Workarounds
Change https://github.com/evidence-dev/evidence/blob/9a8996374f54081745d402791293f48eabf6e7c0/packages/evidence/cli.js#L212
Remove npx from code npx vite dev --port 3000.
For what to use npx here? bun or pnpm constructs the correct env, vite should be resolved without npx.
PS. The project is fantastic. Maybe I will ever write a plugin for IntelliJ :)
@develar, thanks for opening this, and for the kind words! Is this the only blocker for running with bun?
@ItsMeBrianD is working on moving core evidence into a vite plugin, which will address this. He may have some ideas for things we could ship in the interim as well.
Is this the only blocker for running with bun?
There is also an issue with the sources step, which occurs occasionally. Evidence does not seem to check for file existence or something akin to that. It fails with an ENOENT error. In my case, the DuckDB file is available, so the sources step is unnecessary for me, so I didn't complete the investigation of this issue.
I see "In Evidence, you can query local CSV or Parquet files directly in SQL.", but looks like it doesn't work (still data manifest is required).
@ItsMeBrianD is working on moving core evidence into a vite plugin
I'm curious as to why you can't build Evidence on top of vitepress.dev — it will handle all the tedious issues such as theme/layout, dark mode, and so on, related to the static site generator.
To be honest, for my use case, I chose to use vitepress + Build-Time Data Loading. However, I am not the primary target audience for Evidence as I am an expert in web/backend/etc development. In my specific simple case, it was easier to use vitepress and echarts directly.
(Of course, Evidence is exceptional as it efficiently manages a multitude of tasks. Specifically, it provides formatting and features a comprehensive, user-friendly component wrapper for Echarts.)