- 
                Notifications
    You must be signed in to change notification settings 
- Fork 28
Closed
Description
I want to run envio dev, but I am unable to do it because I don't have a start script defined in my package.json:
See error log
> generated@0.1.0 db-setup /Users/prb/Sablier/indexers/src/envio/flow/bindings
> node -e 'require(`./src/db/Migrations.bs.js`).runUpMigrations(true, true)'
[16:14:35.253] INFO (79060): Tracking tables in Hasura
Starting indexer
npm warn Unknown env config "verify-deps-before-run". This will stop working in the next major version of npm.
npm error Missing script: "start"
npm error
npm error Did you mean one of these?
npm error   npm star # Mark your favorite packages
npm error   npm stars # View packages marked as favorites
npm error
npm error To see a list of scripts, run:
npm error   npm run
npm error A complete log of this run can be found in: /Users/prb/.npm/_logs/2025-06-04T13_14_36_302Z-debug-0.log
Error: Failed cli execution
Caused by:
    0: Failed running start on the indexer
    1: Indexer crashed. For more details see the error logs above the TUI. Can't find them? Restart the indexer with the 'TUI_OFF=true pnpm start' command.
error: Recipe `dev` failed on line 33 with exit code 1
This is problematic due to multiple reasons:
- A command in an external dependency like envioshould NOT depend upon user-defined scripts. Envio should do whatever has to be done in thestartscript by itself. Envio should be able to infer the path to theIndex.bs.jsfile from thegenerateddirectory.
- The user may not use package.json#scripts. For instance, we use Just for running commands.
- The error is confusing and hard to debug. At a minimum, Envio should provide guidance to the user regarding what logic has to be added in the startscript.
So please make it possible to not have to define a start script in order to be able to run envio dev.
The fix, for the moment, is to add a start script like so:
"start": "ts-node generated/src/Index.bs.js"Metadata
Metadata
Assignees
Labels
No labels