Skip to content

Fix npm install - #1220

Open
kwikwag wants to merge 1 commit into
coreybutler:masterfrom
kwikwag:patch-1
Open

Fix npm install#1220
kwikwag wants to merge 1 commit into
coreybutler:masterfrom
kwikwag:patch-1

Conversation

@kwikwag

@kwikwag kwikwag commented Jan 12, 2025

Copy link
Copy Markdown

There seems to have been a hiccup when refactoring the temp dir for NPM. See how the tempDir variable was modified -- the line to unzip then proceeds to unzip from the wrong location. This should solve #1209 -- untested. Need to make sure that the rest of the flow works...

There seems to have been a hiccup when refactoring the temp dir for NPM. See how [the tempDir variable](coreybutler@7de073e#diff-c4d480f687d74c39997fc58e33d300c73cfb458321c2ab26c765772db70a679eL498) was modified -- the line to unzip then proceeds to unzip from the wrong location. This should solve coreybutler#1209 -- untested.
@taozai123

Copy link
Copy Markdown

hope review asap

@BerkieBb

Copy link
Copy Markdown

Can confirm this fixes the issue of npm not being downloaded because it doesn't recognize the temporary folder. Built the source myself with this code to confirm. Thank you kiwkwag.

@dev2-rush

Copy link
Copy Markdown

like

@BinToss BinToss left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I've mentally followed the code paths up to Line 799. I also compared a3ce311 to 7de073e for good measure. See https://diffy.org/diff/a336cbca25d7f.


For reviewers' convenience, the filesystem structure of the root directory:

> tree /F nvm-install-1862240460
Folder PATH listing for volume Blade 17
Volume serial number is B0CE-64DF
C:\USERS\NOAH\APPDATA\LOCAL\TEMP\NVM-INSTALL-1862240460
├───temp
│       npm-v6.14.11.zip
│
└───v14.16.0
    │   node64.exe
    │
    └───node_modules

Points of interest in which filesystem paths matter:

  • L671: root is assigned os.MkdirTemp("", "nvm-install-*").
    • Example: %TEMP%\nvm-install-1862240460\.
  • L741: web.GetNpm(root, getNpmVersion(version)) downloads the NPM ZIP to filepath.Join(root, "temp", "npm-v"+npmv+".zip")
    • Example: %TEMP%\nvm-install-1862240460\temp\npm-v6.14.11.zip.
  • L746: tempDir is assigned os.MkdirTemp("", "nvm-npm-*").
    • Example: %TEMP%\nvm-npm-0123456789\
  • L759: tempNpmBin is assigned filepath.Join(tempDir, "nvm-npm", "cli-"+npmv, "bin"), but "cli-" will be replaced with "npm-" for NPM <6.2.0 (at L763).
    • Examples:
      • if NPM >= 6.2.0: %TEMP%\nvm-npm-0123456789\nvm-npm\cli-6.2.0\bin\
      • if NPM < 6.2.0: %TEMP%\nvm-npm-0123456789\nvm-npm\npm-6.1.0\bin\
  • L772-L779: the npm, npm.cmd, npx, and npx.cmd files are moved from tmpNpmBin to ${root}\v${version} wherein version is the Node.js version`
  • L781-L785, npmSourcePath is assigned filepath.Join(tempDir, "nvm-npm", "npm-"+npmv), wherein "npm-" may be replaced with "cli-".
  • L787: npmSourcePath is moved (renamed) to filepath.Join(root, "v"+version, "node_modules", "npm")
  • L800: filepath.Join(root, "v"+version) (Node.js + NPM) is moved to env.root and the installation is complete.

@ShowMeBillyJo

Copy link
Copy Markdown

Just ran into this bug and it killed my vibe for nearly a whole day. Thanks for submitting the patch!

@kwikwag

kwikwag commented Mar 27, 2025

Copy link
Copy Markdown
Author

Hey @BinToss, thanks for the review. Can you please instruct me how to proceed to get this merged?

@BinToss

BinToss commented Mar 27, 2025

Copy link
Copy Markdown

Hey @BinToss, thanks for the review. Can you please instruct me how to proceed to get this merged?

Now we wait for a maintainer to approve a review. Third parties can submit reviews, but cannot submit Approval reviews.

@libugo

libugo commented Apr 15, 2025

Copy link
Copy Markdown

🆘

@Manish-Giri

Copy link
Copy Markdown

Any update on this? The PR has been open since 5 months.

@coreybutler

Copy link
Copy Markdown
Owner

This PR won't be used because the fix is more involved than a one-liner. I've already completed the work, but the release is held up by the arm64 build. GitHub recently added support for this in GitHub Actions, but I've exceeded the maximum GitHub Actions minutes with other projects over the last two months. I anticipate getting this build process complete this month, but my primary focus has been on Author/Runtime (the successor to this project).

Please remember, I am the only person doing any reviews/support on this. My time is finite and my primary focus is on what's next (because I'm as tired of the slow update cycles as everyone else is). I appreciate everyone's understanding.

@github-actions

github-actions Bot commented Jun 3, 2025

Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions Bot added the Stale Stale label Jun 3, 2025
@DawtCom

DawtCom commented Jun 6, 2025

Copy link
Copy Markdown

Curious with this being such a breaking issue and a small change why is this not merged and new version of nvm published?

@coreybutler

Copy link
Copy Markdown
Owner

@DawtCom see #1240 (comment)

@github-actions github-actions Bot removed the Stale Stale label Jun 7, 2025
@github-actions

github-actions Bot commented Jul 7, 2025

Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions Bot added the Stale Stale label Jul 7, 2025
@tadghh

tadghh commented Aug 20, 2025

Copy link
Copy Markdown

A fixed release is available here along with updated readme and build configs (was this vibe-coded?)

@github-actions github-actions Bot removed the Stale Stale label Aug 21, 2025
@iByteABit256

Copy link
Copy Markdown

A fixed release is available here along with updated readme and build configs (was this vibe-coded?)

This worked, but I had to add the elevate.cmd and elevate.vbs files manually. Also it still uses the Local\Temp path instead of Local so I had to move the downloaded node version to the correct directory as well.

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions Bot added the Stale Stale label Sep 29, 2025
@squidjam

Copy link
Copy Markdown

@coreybutler I understand your time is finite, can you please consider delegating review approval with write access into someone with more bandwidth?

You said you would do it in a month in May, and it's understandable you haven't had time but maybe this is why delegating into someone that would have write access could be interesting for the community your app built.

Thanks.

@github-actions github-actions Bot removed the Stale Stale label Oct 14, 2025
@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions Bot added the Stale Stale label Nov 13, 2025
@BinToss

BinToss commented Nov 16, 2025

Copy link
Copy Markdown

Unstale.

@github-actions github-actions Bot removed the Stale Stale label Nov 17, 2025
@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions Bot added the Stale Stale label Dec 17, 2025
@squidjam

Copy link
Copy Markdown

Xmas unstale

@github-actions github-actions Bot removed the Stale Stale label Dec 25, 2025
@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions Bot added the Stale Stale label Jan 25, 2026
@squidjam

Copy link
Copy Markdown

Almost February 2026 unstale

@github-actions github-actions Bot removed the Stale Stale label Jan 27, 2026
@rbenzazon

Copy link
Copy Markdown

nothing can justify keeping a project broken for a year because of one simple broken file path. Mark the project as archived to let everyone know it's broken for good and won't be fixed OR review the small fixes and publish a version with only the hotfixes if the new feature review / major version is too time consuming. Any quality problem this big (not working at all) with this small of a fix and this little care will reflect on any successor project, this need attention !

@coreybutler

Copy link
Copy Markdown
Owner

@rbenzazon This is the last I'm going to comment on the subject, because this is wasting time across multiple issues. You have options:

  1. Use v1.1.12
  2. Build it yourself
  3. Use another project
  4. Author Software (the entity I formed for the future of this and other projects) can provide a paid private release channel for companies.

I understand you feel this is a simple fix, but utilities like this aren't just about writing code, as I've previously detailed. If you feel I should just give up and archive the project because the pace doesn't suit your taste, it's fine by me if you hold that opinion.

For those telling me to delegate to someone else, that is a luxury I don't have. There isn't anyone to delegate the administrative work to and nobody has ever offered. I don't see a point in onboarding new administrative maintainers for a sunsetting project though.

@tadghh

tadghh commented Mar 23, 2026

Copy link
Copy Markdown

@rbenzazon This is the last I'm going to comment on the subject, because this is wasting time across multiple issues. You have options:

1. Use v1.1.12

2. Build it yourself

3. Use another project

4. Author Software (the entity I formed for the future of this and other projects) can provide a paid private release channel for companies.

I understand you feel this is a simple fix, but utilities like this aren't just about writing code, as I've previously detailed. If you feel I should just give up and archive the project because the pace doesn't suit your taste, it's fine by me if you hold that opinion.

For those telling me to delegate to someone else, that is a luxury I don't have. There isn't anyone to delegate the administrative work to and nobody has ever offered. I don't see a point in onboarding new administrative maintainers for a sunsetting project though.

no one is saying to archive or anything like that, update the readme and direct users to one of the 5 forks fixing this issue

@coreybutler

Copy link
Copy Markdown
Owner

"no one is saying to archive or anything like that"

image

@tadghh

tadghh commented Mar 23, 2026

Copy link
Copy Markdown

"no one is saying to archive or anything like that"

image

corey you have spent more time bickering with us than it would have take to merge any of the FIVE PRs that fix the issue at hand

@ShowMeBillyJo

Copy link
Copy Markdown

corey you have spent more time bickering with us than it would have take to merge any of the FIVE PRs that fix the issue at hand

Bad take. It's not fixing the code that's the issue, it's releasing it.

@rbenzazon

Copy link
Copy Markdown

actually, the problem is just that users shouldn't know about which version works and which doesn't, since the npm registry has a @latest which is supposed to be stable, I understand that the current latest has a purpose of being a transition, but maybe it was released too early before it passed all the tests. Personally I won't install manually the old node version I need, what's the point of using nvm then? I won't manually downgrade nvm either, it's either latest or I won't use it at all. I completely avoided what I had to try with the old version because I lost too much time researching and arguing the issue, I'm just disappointed that nvm wasn't stable enough. I also had some issues with other major packages recently that have completely broken latest version on npm (nuxt with storybook), I guess it's a bad trend. If I can give my advice : focus on stability before new features, always keep the latest in perfect working order. It sounds simple and it's not but it deserves attention. Thanks you @coreybutler for this useful contribution, I'm sure you spend a lot of time working on it, but your project has become critical for many people and we take it for granted. Please take our criticism as constructive, it's not personal. maybe the release process could use some more automation and streamlining to relieve your work charge.

@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions Bot added the Stale Stale label May 2, 2026
@squidjam

squidjam commented Jun 8, 2026

Copy link
Copy Markdown

Look, we can continue to comment here (ill advised, he's told us all we needed to know) and continue getting nowhere, or fork the thing (maybe rewrite it in a more modern language, avoid becoming a "benevolent dictatorship" as forks usually tend to) and then let them tools (ours and his) live their lives.
I think I'll make time this weekend to see what can be done about it.
If someone is interested, get in touch.

@coreybutler

Copy link
Copy Markdown
Owner

I've completed v2. None of these PRs are relevant anymore. Several announcements coming as soon as we wrap up deployment testing.

@github-actions github-actions Bot removed the Stale Stale label Jun 10, 2026
@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions Bot added the Stale Stale label Jul 12, 2026
@tadghh

tadghh commented Jul 13, 2026

Copy link
Copy Markdown

bump

@BinToss

BinToss commented Jul 13, 2026

Copy link
Copy Markdown

bump

It's been fixed in source, but releases are failing.

@github-actions github-actions Bot removed the Stale Stale label Jul 14, 2026
@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions Bot added the Stale Stale label Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stale Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.