Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check to make sure default npm exists at path before trying to use it #30910

Merged
merged 3 commits into from Apr 18, 2019

Conversation

mjbvz
Copy link
Contributor

@mjbvz mjbvz commented Apr 13, 2019

Bug
If the typings installer is run under a copy of node that does not include npm—but on a machine that does have npm installed—it will incorrectly try to use the npm that does not exist next to its running version of node

Fix
Make sure that we check that npm we select exists before trying to use it as the default. Otherwise, fall back to using plain old npm

Fixes #30909

**Bug**
If the typings installer is run under a copy of node that does not include npm—but on a machine that does have npm installed—it will incorrectly try to use the npm that does not exist next to its running version of node

**Fix**
Make sure that we check that npm we select exists before trying to use it as the default. Otherwise, fall back to using plain old `npm`
Copy link
Member

@sheetalkamat sheetalkamat left a comment

Choose a reason for hiding this comment

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

#24425 reverted this exact change since it breaks VS

@amcasey
Copy link
Member

amcasey commented Apr 15, 2019

@sheetalkamat I checked my mail box and chat histories but couldn't find anything about ATA from last May. I'm not sure I was involved.
We changed node versions and install paths a few VS versions ago, so it's possible this is no longer an issue.

@mjbvz
Copy link
Contributor Author

mjbvz commented Apr 15, 2019

@amcasey Would old VS Versions still be broken though? Can we perhaps pass in a command line flag to enable this new behavior?

@amcasey
Copy link
Member

amcasey commented Apr 15, 2019

@mjbvz Good catch - yes, it would have to be behind a flag (assuming it works now).

@RyanCavanaugh RyanCavanaugh merged commit 7ccc89b into microsoft:master Apr 18, 2019
RyanCavanaugh pushed a commit to RyanCavanaugh/TypeScript that referenced this pull request Apr 18, 2019
…microsoft#30910)

* Check to make sure default npm exists at path before trying to use it

**Bug**
If the typings installer is run under a copy of node that does not include npm—but on a machine that does have npm installed—it will incorrectly try to use the npm that does not exist next to its running version of node

**Fix**
Make sure that we check that npm we select exists before trying to use it as the default. Otherwise, fall back to using plain old `npm`

* Add command line flag to gate new behavior

* Fix missing semicolon
RyanCavanaugh added a commit that referenced this pull request Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants