Can't make NG_PERSISTENT_BUILD_CACHE work
See original GitHub issueπ Bug report
Command (mark with an x
)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Description
I am trying to use the new NG_PERSISTENT_BUILD_CACHE=1 variable, but I donβt see any improvements at all, so Iβm looking to understand why it doesnβt work.
I have debugged in Angular code to verify that NG_BUILD_CACHE is set (it is) and that NG_PERSISTENT_BUILD_CACHE is available in process.env (it is).
By debugging, I saw that this cache is supposed to be in node_modules/.cache/angular-webpack Yet after a build I see nothing there.
What am I missing ?
π Your Environment
Angular CLI: 12.1.0
Node: 14.17.0
Package Manager: npm 7.20.0
OS: linux x64
Angular: 12.1.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, platform-browser
... platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1201.0
@angular-devkit/build-angular 12.1.0
@angular-devkit/core 12.1.0
@angular-devkit/schematics 12.1.0
@angular/fire 6.1.5
@schematics/angular 12.1.0
rxjs 7.0.0-beta.10
typescript 4.2.4
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
[RFC] Persistent build cache by default Β· Issue #21545 - GitHub
Users can opt-in to the experimental build persistent cache using the NG_PERSISTENT_BUILD_CACHE=1 environment variable.
Read more >NG_PERSISTENT_BUILD_CAC...
You seem to be using Windows cmd to run the command, and hence you are getting the error. The command: NG_PERSISTENT_BUILD_CACHE=1 ng serve....
Read more >Angular on Twitter: "Angular v12.1 enables opt-in usage of the ...
It's an environment variable. Try `set NG_PERSISTENT_BUILD_CACHE=1` and then run build.
Read more >ng cache - Angular
Angular CLI saves a number of cachable operations on disk by default. When you re-run the same build, the build system restores the...
Read more >How to speed up Angular build times with caching - Medium
Drastically speed up your Angular build times by saving your ng build and jest caches. Up to a 75% percent decrease in build...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@alan-agius4 I see youβve been working on this, thank you so much. I have tested it on my Ionic project, it works fine !
My build time now down from 60 to 37 seconds
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.