Install Angular CLI Offline using Yarn Offline Mode

FOLLOW THE STEPS HERE:

  • Create package.json
    • Run this to set offline cache: yarn config set yarn-offline-mirror ./npm-packages-offline-cache
    • This will create a .yarnrc file in your HOME directory (c:\users<userName>. Move this file to the project root.
    • Install angular cli as either one of below:
      • global dependency: yarn global add @angular/cli
      • dev dependency: yarn add @angular/cli -D. Note that in this case, you’ll have to add your local project path (eg. C:\code\ngCli\node_modules.bin) to env variables for ng new PROJECT_NAME and other commands to work.

    ref: https://yarnpkg.com/blog/2016/11/24/offline-mirror/

CODE: https://github.com/tkhemani/yarn-offline-setup

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s