Fix monorepo dependency installation and broken npm run dev #4

Closed
opened 2026-07-30 04:04:24 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-07-30 04:04:24 +00:00 (Migrated from github.com)

Problem

The documented root setup is broken on PR #3.

Running:

npm install
npm run dev

installs only the root package because npm workspaces were removed. scripts/dev.mjs then runs npx vite inside frontend/, which partially downloads Vite but cannot resolve the frontend's declared development dependencies such as vite, vitest/config, and @vitejs/plugin-react.

Observed failure:

Could not resolve 'vite'
Could not resolve 'vitest/config'
Could not resolve '@vitejs/plugin-react'
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite'

Found during review of PR #3.

Required changes

  • Restore a coherent root-level dependency installation strategy.
  • Prefer npm workspaces with a root lockfile so one root npm ci installs the monorepo.
  • Do not use npx as an implicit package downloader in the dev runner.
  • Launch the tracked frontend command explicitly, for example through npm --prefix frontend run dev or a restored workspace command.
  • Fail early with a clear message when dependencies are absent.
  • Keep supervised shutdown and signal forwarding.
  • Update README and Nix shell instructions to match the real command sequence.

Acceptance criteria

  • A fresh clone succeeds with the documented commands only.
  • npm ci && npm run dev starts the Lisp process and Vite without downloading undeclared packages.
  • CI runs the same root install and startup path used by developers.
  • No manual cd frontend && npm ci workaround is required.

Related PR: #3

## Problem The documented root setup is broken on PR #3. Running: ```bash npm install npm run dev ``` installs only the root package because npm workspaces were removed. `scripts/dev.mjs` then runs `npx vite` inside `frontend/`, which partially downloads Vite but cannot resolve the frontend's declared development dependencies such as `vite`, `vitest/config`, and `@vitejs/plugin-react`. Observed failure: ```text Could not resolve 'vite' Could not resolve 'vitest/config' Could not resolve '@vitejs/plugin-react' Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite' ``` Found during review of PR #3. ## Required changes - Restore a coherent root-level dependency installation strategy. - Prefer npm workspaces with a root lockfile so one root `npm ci` installs the monorepo. - Do not use `npx` as an implicit package downloader in the dev runner. - Launch the tracked frontend command explicitly, for example through `npm --prefix frontend run dev` or a restored workspace command. - Fail early with a clear message when dependencies are absent. - Keep supervised shutdown and signal forwarding. - Update README and Nix shell instructions to match the real command sequence. ## Acceptance criteria - A fresh clone succeeds with the documented commands only. - `npm ci && npm run dev` starts the Lisp process and Vite without downloading undeclared packages. - CI runs the same root install and startup path used by developers. - No manual `cd frontend && npm ci` workaround is required. Related PR: #3
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/quasar#4
No description provided.