How to configure Angular NES
First, please review our Minimum Requirements to ensure a smooth installation. Then follow 3 easy steps:
1. Update your package.json
2. Create or update your .npmrc file
3. Install & Run!
Detailed Instructions
1. Substitute the @angular/* references & update your package.json with the following:
{
"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:
- A 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".
Recommended for Angular 11 and Angular 12:
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.
"overrides": {
...etc.
"loader-utils": "2.0.4",
...etc.
}
2. Create an .npmrc file with the following:
- Replace <NES_ACCESS_TOKEN>
with your access token
@neverendingsupport:registry=https://registry.nes.herodevs.com/npm/pkg/
//registry.nes.herodevs.com/npm/pkg/:_authToken=<NES_ACCESS_TOKEN>
3. Install your dependencies and run the service:
npm install
npm start
And just like that, you can run your integration tests against 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:
https://registry.nes.herodevs.com/npm/pkg/@neverendingsupport/angular/-/<package-version>.tgz
where <package-version>
is the version as listed in the Angular NES Package List.
For example:
https://registry.nes.herodevs.com/npm/pkg/@neverendingsupport/angular/-/15.2.10-core-15.2.12.tgz
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:
- The relevant sections of your
package.json
(applicabledependencies
&overrides
blocks). - The version of
Node.js
andNPM
you are using. You can gather them by runningnode -v
andnpm -v
respectively. - The last 6 characters of the NES Access Token being used.