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

Stop calling npm install on each prepare of ng projects #2086

Merged
merged 1 commit into from
Sep 30, 2016

Conversation

rosen-vladimirov
Copy link
Contributor

During project preparation CLI's trying to detect if all dependencies from package.json are installed by listing contents of node_modules directory.
In case any of them are missing, CLI calls npm install inside the project. This executes all postinstall scripts of the dependencies and leads to slower prepare (and also slower builds in lots of cases).
The problem is that the code is reading the contents of node_modules directory, but scoped dependencies (used in all angular projects) are not in the root of node_modules.
So in all Angular projects each prepare calls npm install. Fix the listing of the directories to include scoped packages, so in case everything is installed, CLI will not call npm install on the next preparation of the project.

During project preparation CLI's trying to detect if all dependencies from package.json are installed by listing contents of node_modules directory.
In case any of them are missing, CLI calls `npm install` inside the project. This executes all postinstall scripts of the dependencies and leads to slower prepare (and also slower builds in lots of cases).
The problem is that the code is reading the contents of node_modules directory, but scoped dependencies (used in all angular projects) are not in the root of node_modules.
So in all Angular projects each prepare calls `npm install`. Fix the listing of the directories to include scoped packages, so in case everything is installed, CLI will not call npm install on the next preparation of the project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants