GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: add preinstall script for npm on OS X by evanlucas · Pull Request #3986 · nodejs/node

Conversation

@evanlucas

@evanlucas evanlucas commented Nov 23, 2015

Copy link
Copy Markdown
Contributor

Make sure we cleanly remove npm before installing on OS X

Related: #3606

This is working for me locally, but would be great to have some others test.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Fishrock123

Fishrock123 commented Nov 23, 2015

Copy link
Copy Markdown
Contributor

Notes: I couldn't reproduce the original anymore, so I don't know how we can confirm this will actually work?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fishrock123 Fishrock123 added the install Issues and PRs related to installing Node.js and its installers. label Nov 23, 2015
@evanlucas

evanlucas commented Nov 23, 2015

Copy link
Copy Markdown
Contributor Author

Good point. I'll see if I can spin up a vm and try to reproduce

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mscdex mscdex added the macos Issues and PRs related to the macOS platform. label Nov 23, 2015
@Fishrock123 Fishrock123 mentioned this pull request Dec 4, 2015
Error: Cannot find module './lib' #3606
Closed
rvagg
rvagg reviewed Dec 8, 2015
View reviewed changes
Comment thread tools/osx-pkg-preinstall.sh Outdated

@rvagg rvagg Dec 8, 2015

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

why are we doing a cd followed by rm and not rm with absolute path?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@evanlucas evanlucas Dec 8, 2015

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

wow, good question. That is how the postinstall script is done. And now that I look again, it was done that way for a reason. Updating now

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@rvagg rvagg Dec 8, 2015

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

maybe we also need a set -e if we're doing multiple lines, if the cd fails then the rm will still execute

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@evanlucas
tools: add preinstall script for npm on OS X
8ac2af7
Make sure we cleanly remove npm before installing on OS X
@evanlucas
evanlucas force-pushed the pkgs branch from c428414 to 8ac2af7 Compare December 8, 2015 02:25
@evanlucas

evanlucas commented Dec 8, 2015

Copy link
Copy Markdown
Contributor Author

Ok, updated with absolute path and set -e

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rvagg

rvagg commented Dec 8, 2015

Copy link
Copy Markdown
Member

test build of this created @ https://nodejs.org/download/test/v6.0.0-test201512088ac2af7628/ if anyone else wants to review the changes

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rvagg

rvagg commented Dec 8, 2015

Copy link
Copy Markdown
Member

I touched a bunch of TEST files under /usr/local/lib before running the installer and they still exist:

$ node -v
v6.0.0-test201512088ac2af7628
$ find /usr/local -name TEST
/usr/local/lib/node_modules/npm/node_modules/TEST
/usr/local/lib/node_modules/npm/TEST
/usr/local/lib/node_modules/TEST
/usr/local/lib/TEST

So something's not right with this as far as I can tell.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rvagg rvagg mentioned this pull request Dec 8, 2015
Refactor mac installer (Rebase of #776 against master) #2571
Closed
@rvagg

rvagg commented Dec 8, 2015

Copy link
Copy Markdown
Member

Perhaps it needs to be "preupgrade" as well as "preinstall". Reading here http://s.sudre.free.fr/Stuff/PackageMaker_Howto.html but I don't know how authoritative this is.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@evanlucas

evanlucas commented Dec 8, 2015

Copy link
Copy Markdown
Contributor Author

@rvagg Ok yes it looks like neither the preinstall, nor the postinstall scripts were running. What is weird to me is that the local.pkg installs npm, so there really is no need to have an npm.pkg. Even if one deselects the npm choice, npm will still be installed. I can make it a single package and then the scripts work properly. I guess my question becomes, is it worth it? With how outdated PackageMaker.app is, I really think that we should try to get #2571 landed. Is there anything blocking that?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fishrock123

Fishrock123 commented Dec 14, 2015

Copy link
Copy Markdown
Contributor

@evanlucas I think the other issue mostly needs review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott
Trott force-pushed the master branch from 1e896a6 to 082cc8d Compare December 27, 2015 02:01
@Fishrock123 Fishrock123 mentioned this pull request Jan 12, 2016
TODO/XXX in tools directory #4635
Closed
@evanlucas

evanlucas commented Feb 24, 2016

Copy link
Copy Markdown
Contributor Author

Closing. Hopefully we can get the new OS X pkg stuff in soon. It should replace this anyways

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@evanlucas evanlucas closed this Feb 24, 2016
@evanlucas
evanlucas deleted the pkgs branch February 24, 2016 12:48
rvagg pushed a commit to rvagg/io.js that referenced this pull request Jun 8, 2016
@fhemberger @rvagg
Add npm preinstall script
d876918
See nodejs#3986
This was referenced Aug 11, 2020
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 turkdevops/node#7
Merged
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 turkdevops/node#8
Open
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 turkdevops/node#10
Merged
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 turkdevops/node#12
Merged
@snyk-bot snyk-bot mentioned this pull request Oct 22, 2020
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 turkdevops/node#24
Open
@sniten sniten mentioned this pull request Jan 22, 2021
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 Zintexiss/node-22#9
Merged
This was referenced Mar 16, 2021
[Snyk] Fix for 8 vulnerabilities ryan-ally/node#20
Merged
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 ryan-ally/node#21
Open
This was referenced Mar 22, 2022
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 ryan-ally/node#55
Open
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 ryan-ally/node#56
Open
[Snyk] Fix for 1 vulnerabilities ryan-ally/node#57
Open
[Snyk] Fix for 1 vulnerabilities baby636/node#40
Open
[Snyk] Fix for 1 vulnerabilities baby636/node#42
Open
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 baby636/node#43
Open
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 baby636/node#44
Open
[Snyk] Fix for 1 vulnerabilities baby636/node#45
Open
[Snyk] Fix for 1 vulnerabilities baby636/node#46
Open
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 Verdinjoshua26/node#17
Open
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 Zintexiss/node-22#72
Open
[Snyk] Fix for 1 vulnerabilities Zintexiss/node-22#73
Open
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 Zintexiss/node-22#74
Open
[Snyk] Fix for 1 vulnerabilities Zintexiss/node-22#76
Open
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 Mement-Mori/node#15
Open
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 Mement-Mori/node#16
Open
[Snyk] Fix for 1 vulnerabilities Mement-Mori/node#17
Open
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 MaxMood96/node#19
Open
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 MaxMood96/node#20
Open
[Snyk] Fix for 1 vulnerabilities MaxMood96/node#21
Open
This was referenced Aug 19, 2022
[Snyk] Fix for 9 vulnerabilities MarcelRaschke/node#4
Open
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 MarcelRaschke/node#11
Open
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 MarcelRaschke/node#12
Open
@Verdinjoshua26 Verdinjoshua26 mentioned this pull request Oct 8, 2022
[Snyk] Security upgrade mocha from 5.2.0 to 6.2.3 Verdinjoshua26/node#30
Open
@aliscco aliscco mentioned this pull request Jun 21, 2023
[Snyk] Fix for 1 vulnerabilities aliscco/alisco-node#487
Open
This was referenced Nov 29, 2023
[Snyk] Security upgrade webpack from 1.15.0 to 2.2.0 aliscco/alisco-node#763
Open
[Snyk] Fix for 14 vulnerabilities aliscco/alisco-node#776
Open
[Snyk] Security upgrade mocha from 6.2.0 to 6.2.1 aliscco/alisco-node#787
Open
This was referenced May 14, 2024
[Snyk] Fix for 2 vulnerabilities aliscco/alisco-node#1491
Open
[Snyk] Security upgrade webpack from 1.15.0 to 2.2.0 aliscco/alisco-node#1537
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

install Issues and PRs related to installing Node.js and its installers. macos Issues and PRs related to the macOS platform.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@evanlucas @Fishrock123 @rvagg @mscdex
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.