Skip to content

fix: create engine/package.json before npm install to prevent global install#5

Open
Belkouche wants to merge 1 commit intotechjarves:mainfrom
Belkouche:fix/engine-missing-package-json
Open

fix: create engine/package.json before npm install to prevent global install#5
Belkouche wants to merge 1 commit intotechjarves:mainfrom
Belkouche:fix/engine-missing-package-json

Conversation

@Belkouche
Copy link
Copy Markdown

Summary

  • Without a package.json in engine/, npm install falls back to a global install inside the portable Node prefix instead of creating a local node_modules/
  • This causes OC_BIN to never be found, falling through to npx openclaude which resolves a wrong package (openclaude@0.0.1) with no bin field
  • Fix: write a minimal package.json into engine/ before running npm install

Fixes #4

Test plan

  • Delete engine/node_modules/ and engine/package.json to simulate a fresh clone
  • Run ./start.sh and verify the engine installs into engine/node_modules/ (not globally)
  • Confirm engine/node_modules/@gitlawb/openclaude/bin/openclaude exists after install
  • Launch AI normally and verify no "could not determine executable to run" error

…install

Without a package.json in engine/, npm install falls back to a global
install inside the portable Node prefix instead of creating a local
node_modules/. This causes OC_BIN to never be found, falling through
to `npx openclaude` which resolves a wrong package and errors with
"could not determine executable to run".

Fixes techjarves#4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: npm installs @gitlawb/openclaude globally instead of locally due to missing package.json

2 participants