Search...
Toggle theme

Angular NES Configuration

Step-by-step guide for configuring and installing the Angular Never-Ending Support (NES) version, including troubleshooting steps and minimum requirements.

Minimum Requirements

  1. Update your package.json
  2. Create or update your .npmrc file
  3. Install & Run!

Detailed Instructions

Substitute the @angular/* references & include our angular-tools library in your package.json with the following:

package.json
{
  "scripts": {
    "postinstall": "npx ngnes",
    // ...etc.
  },
  "dependencies": {
    "@angular/core": "npm:@neverendingsupport/angular@1.2.3-core-4.5.6",
    "@angular/common": "npm:@neverendingsupport/angular@1.2.3-common-4.5.6",
    // ...etc.
  },
  "devDependencies": {
    "@neverendingsupport/angular-tools": "1.1.1",
    "@angular/compiler-cli": "npm:@neverendingsupport/angular@1.2.3-compiler-cli-4.5.6",
    // ...etc.
  },
  "overrides": {
    "@angular/core": { ".": "npm:@neverendingsupport/angular@1.2.3-core-4.5.6" },
    "@angular/common": { ".": "npm:@neverendingsupport/angular@1.2.3-common-4.5.6" },
    // ...etc.
  }
}

Installation Notes

  • TA quick explanation of the version numbers represented above. The format of "1.2.3-core-4.5.6" is comprised 3 separate sections the first section "1.2.3" represents the public version this is based upon. The second section, "core", is the name of the Angular package meaning that the above value of "core" associates to the public "@angular/core". The final section, "4.5.6", is the version NES has released. To find the version you wish to install, please review the Angular NES Package List.
  • Be sure to include the following additions:
    • The @neverendingsupport/angular-tools package, which has tools required for successfully installing and operating Never-Ending Support in legacy Angular projects.
    • The postinstall script, which automatically will run "npx ngnes" on install. This command in made available by the @neverendingsupport/angular-tools package.
    • If postinstall scripts are disabled, you will need to run "npx ngnes" immediately after every install and before running "ng build".

In addition to the angular/* overrides, for Angular 11 and Angular 12 it is recommended to also add an override in your package.json for loader-utils to use version 2.0.3 or 2.0.4 to resolve CVE-2022-37601.

package.json
"overrides": {
    // ...etc.
    "loader-utils": "2.0.4",
    // ...etc.
  }

Create an .npmrc file with the following:

@neverendingsupport:registry=https://registry.nes.herodevs.com/npm/pkg/
//registry.nes.herodevs.com/npm/pkg/:_authToken=<NES_ACCESS_TOKEN or VALID_EMAIL>
  • Replace <NES_ACCESS_TOKEN or VALID_EMAIL> with your access token or a valid email address.
  • Using Artifactory? See our Artifactory Instructions for setup and configuration details.

Install your dependencies, then build and run the service:

npm install
npx ng serve

And just like that, you're up and running with the Angular NES!

Additional Information

All of our Angular packages can be accessed via direct download URLs

The download URLs for Angular NES follow the pattern of:

Troubleshooting

If your NPM install fails, you're not seeing your packages replaced, or are encountering any other issues, please reach out to support@herodevs.com with the following:

  1. The relevant sections of your package.json (applicable dependencies & overrides blocks).
  2. The version of Node.js and NPM you are using. You can gather them by running node -v and npm -v respectively.
  3. The last 6 characters of the NES Access Token being used.