[Windows] laravel new fails with "npm isn't installed" when using NVM (Author Software\nvm)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 66/100
Research direction
Start by reading the Rust CLI's Windows code that checks for npm and launches it; the issue does not name a file or test, so locate those entry points first. Reproduce the failure in PowerShell with NVM, then check whether npm detection or process launch rejects its executable path. Done when laravel new proceeds past the npm check with this setup and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Description
Laravel Installer Version
Latest (Rust CLI binary via php.new)
Operating System
Windows 11 / PowerShell
Description
When running laravel new <project-name> in PowerShell on Windows and selecting Rust (or any option that checks for npm), the installer immediately fails with:
✘ npm isn't installed; install Node.js from https://nodejs.org
However, both node and npm are properly installed via NVM (Author Software\nvm), present in the system/user PATH, and work normally in PowerShell and cmd.exe.
Steps To Reproduce
- Install Node.js and npm on Windows using NVM (
C:\Users\<user>\AppData\Local\Author Software\nvm). - Verify that
node -v(v24.22.3),npm -v(12.2.3),rustc --version(1.100.1), andgit --version(2.56.1) all work properly in PowerShell. - Run
laravel new laravel-rustin PowerShell. - Select Rust when prompted for the language.
- The CLI fails immediately with
npm isn't installed; install Node.js from https://nodejs.org.
Additional Context
where.exe npmresolves toC:\Users\<user>\AppData\Local\Author Software\nvm\.nodejs\npm.exe.(Get-Command node).Sourceresolves toC:\Users\<user>\AppData\Local\Author Software\nvm\.nodejs\node.exe.- Even when placing a custom
npm.exeshim at the very top of$env:PATH(e.g., in~\.cargo\bin\npm.exe), the Laravel CLI never invokes it, suggesting it either resolvesnpmby inspecting thenode.exedirectory directly or fails to execute NVM's junction/shim executables on Windows.
- Dominant language
- Rust
- Stars
- 2.2k
- Forks
- 105
- Avg merge
- 7h 19m
- Merged PRs (30d)
- 41
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from laravel/rust
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
laravel/rust#98 · 8 comments · 10 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
neuralmagic/crucible#579 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
laravel/rust-framework#864 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
eclipse-score/kyron#249 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
seanmonstar/reqwest#3157 ·
Maintainers usually reply within 2 days