How can I install angular cli in iis server as it has no internet connectivity

Dharshika Sivakumar 0 Reputation points
2025-08-19T03:48:25.8733333+00:00

I need to install angular in my iis server, angular of version 19.0.6 with node version 20.9.0. But iis server doesn't have internet connectivity. How can I do this?

Windows development | Internet Information Services
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 79,601 Reputation points Volunteer Moderator
    2025-08-19T16:13:44.9833333+00:00

    angular cli is a node program, which is typically installed in either the local or global the node_modules folder. once the cli builds a site its just html, html assets and javascript files.

    IIS server would not typically use the cli, but rather host the site built from the cli. in this case the angular app its a just a static html site, and node is not required.

    anyway to install on the server:

    download the node windows installer, and copy to the IIS server. run installer.

    to copy npm modules to the server:

    first on a computer with internet access you create a node project will all the required modules. then use npm pack to a tarball of the modules you want. see thread:

    https://stackoverflow.com/questions/23250805/how-to-install-nodejs-project-locally-without-internet-connection

    if node is installed on the IIS server, you can just copy the angular project including its node_modules folder (be sure angular is installed locally, no -g switch).

    note: IIS can not run the angular cli directly. you would need to create a IIS application that knows how to run the cli and setup the proper working folder and environment.

    0 comments No comments

  2. Tom Tran (WICLOUD CORPORATION) 525 Reputation points Microsoft External Staff
    2025-08-20T03:25:18.1133333+00:00

    Hi Dharshika Sivakumar,

    This is a common scenario in enterprise environments where servers are isolated for security reasons.

    So you need Angular CLI v19.0.6 with Node.js v20.9.0 on an IIS server that has no internet connectivity. The challenge is that Angular CLI and its dependencies are distributed via npm, which normally requires internet access. However, this is possible using an offline installation strategy. I can be tricky because:

    • Angular CLI depends on multiple npm packages.
    • npm by default fetches packages from the registry.
    • Without internet, you must pre-download all dependencies and transfer them to the offline server.

    Solution 1: Official Offline Installation Approach

    Step 1: Prepare on an Online Machine

    • Install Node.js 20.9.0 (LTS) on your online machine: Node.js v20.9.0
    • Install Angular CLI v19.0.6 globally:
    npm install -g @angular/cli@19.0.6
    
    • Download all required packages for offline use:
      • Use npm pack to create tarballs for Angular CLI and its dependencies:
    mkdir offline-packages
    cd offline-packages
    npm pack @angular/cli@19.0.6
    
    • Or hydrate npm cache for offline mode:
    npm install --cache ./npm-cache --prefer-offline
    

    Step 2: Transfer to the Offline IIS Server

    • Copy:
      • Node.js installer
      • The offline-packages folder or npm cache
    • Install Node.js on the IIS server.
    • Configure npm to use the local cache:
    npm config set cache "C:\path\to\npm-cache"
    
    • Install Angular CLI offline:
    npm install -g @angular/cli@19.0.6 --offline
    

    Solution 2: Manual Zip & Transfer method

    If you prefer a simpler approach without npm cache tricks, you can follow this method:

    On an online machine:

    • Create a folder and run:
    • npm install @angular/cli@19.0.6
    • This will download Angular CLI and all dependencies into node_modules.
    npm install @angular/cli@19.0.6
    
    • Create a folder and run:
    • npm install @angular/cli@19.0.6
    • This will download Angular CLI and all dependencies into node_modules.

    Zip the entire folder (including node_modules) and transfer it to the offline server.

    Extract it and use the CLI from the bin folder (e.g., node_modules/.bin/ng).

    For creating projects offline:

    • Use:
    ng new my-project --skip-install
    

    Let me know how it goes! I'd be happy to help.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.