-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
Description
I setup my Rails project with bun, but when running the install generator with --package-manager=bun (or yarn/pnpm), it looks like the generator still uses hardcoded npm commands in several places, causing errors like sh: 1: npm: not found when npm is not installed.
Steps to Reproduce
- Install the gem in a Rails project with --javascript=bun
- Run
bin/rails generate inertia:install --package-manager=bun - User sees a
npm: not founderror
Affected Code Locations
lib/generators/inertia/install/install_generator.rb
- Lines 131-133: TypeScript check scripts use
npm pkg setrun 'npm pkg set scripts.check="..."' if svelte? run 'npm pkg set scripts.check="..."' if framework == 'vue' run 'npm pkg set scripts.check="..."' if framework == 'react'
- Line 266: Version resolution uses npm show
npm show @inertiajs/core@#{options[:inertia_version]} version --json | tail -n2 | head -n1 | tr -d '", '.strip
I think 2 is where my current error is coming from, but 1 might be worth checking as well.
yogeshjain999
Metadata
Metadata
Assignees
Labels
No labels