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

build: use NPM to install node_modules #1007

Merged
merged 1 commit into from
Dec 7, 2020

Conversation

kyliau
Copy link
Contributor

@kyliau kyliau commented Dec 4, 2020

semver is a prod dependency of vscode-languageclient.
In the old build pipeline, vscode-languageclient is declared in
client/package.json.
When yarn installs dependencies in the client directory, it will put semver
next to vscode-languageclient in client/node_modules.

In the new build pipeline, vscode-languageclient is declared in root
package.json.
When yarn installs dependencies in the root directory, it chooses not to hoist
semver, instead puts it in a nested node_modules under
node_modules/vscode-languageclient/node_modules.

There is a bug in vsce that causes it to ignore nested node_modules,
resulting in a vsix build that is broken. The issue is tracked
here, but it does not look like a fix will come any time soon.

For now we should install our dependencies using NPM.

Copy link
Member

@ayazhafiz ayazhafiz left a comment

Choose a reason for hiding this comment

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

Thanks for the great explanation.

scripts/build.sh Show resolved Hide resolved
`semver` is a prod dependency of `vscode-languageclient`.
In the old build pipeline, `vscode-languageclient` is declared in
`client/package.json`.
When yarn installs dependencies in the `client` directory, it will put `semver`
next to `vscode-languageclient` in `client/node_modules`.

In the new build pipeline, `vscode-languageclient` is declared in root
`package.json`.
When yarn installs dependencies in the root directory, it chooses not to hoist
`semver`, instead puts it in a nested node_modules under
`node_modules/vscode-languageclient/node_modules`.

There is a bug in vsce that causes it to ignore nested `node_modules`,
resulting in a `vsix` build that is broken. The issue is trackeed
[here](microsoft/vscode-vsce#432), but it does not
look like a fix will come any time soon.

For now we should install our dependencies using NPM.
@kyliau kyliau merged commit 7fe63cb into angular:master Dec 7, 2020
@kyliau kyliau deleted the install-using-npm branch December 7, 2020 21:50
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants