Reputation: 57
I am trying to create a new angular app while offline by running the following command with yarn as my default package manager
ng new my-app
The app boilerplate is created but when installing packages using yarn. Yarn keeps throwing an error saying I am offline, which I am, but I want the yarn to use the offline cache for angular to create the new app. I have tried running:
ng new my-app --offline
But angular CLI does not recognize the offline flag. npm used to work fine while I was offline, how do I get this working with yarn?
Upvotes: 0
Views: 670
Reputation: 5600
You can create the application with --skip-install
to avoid install and use npm install --offline
if you are using npm version greater than v5.0.0:
ng new test-app --skip-install
cd test-app
npm install --offline
It does error out if the package you want is not in the cache.
Upvotes: 1