How to configure Angular NES
Introduction
The HeroDevs NES team is proud to offer an integration trial for Angular NES!
This trial version is simply a repackaging of the OSS @angular/core module to demonstrate how Angular NES is a drop-in replacement for the OSS Angular we all know and love. As such it is not production ready and does not contain any fixes.
First, please review our Minimum Requirements to ensure a smooth installation.
Detailed Instructions
1. Substitute the @angular/core references & include our angular-tools library in your package.json with the following:
{
"scripts": {
"postinstall": "npx ngnes",
...etc.
},
"dependencies": {
"@angular/core": "npm:@neverendingsupport/angular@1.2.3-trial-core",
...etc.
},
"devDependencies": {
"@neverendingsupport/angular-tools": "1.1.1",
...etc.
},
"overrides": {
"@angular/core": { ".": "npm:@neverendingsupport/angular@1.2.3-trial-core" },
...etc.
}
}
Installation Notes:
- The version represented above (1.2.3) is a placeholder for the version you are installing
- 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".
- 8.2.14-trial-core
- 10.2.5-trial-core
- 11.2.14-trial-core
- 12.2.17-trial-core
- 13.4.0-trial-core
- 14.3.0-trial-core
- 15.2.10-trial-core
2. Create an .npmrc file with the following:
- Replace<NES_ACCESS_TOKEN or VALID_EMAIL>
with your access token or a valid email address.@neverendingsupport:registry=https://registry.nes.herodevs.com/npm/pkg/
//registry.nes.herodevs.com/npm/pkg/:_authToken=<NES_ACCESS_TOKEN or VALID_EMAIL>
3. Install your dependencies, then build and run the service:
npm install
### If postinstall scripts are disabled, also run the following command:
# npx ngnes
npx ng serve
And just like that, you're up and running with the Angular NES Trial!
Troubleshooting
The packages are installed correctly but the build fails.
Read on below if your build fails with an error like the following:
This is a known issue and the result of a typing incompatibility with several versions of the Angular Compatibility Compiler (ngcc) and how initial compilation happens. This issue should be addressed automatically by our angular-tools library upon installation, but can fail to run if postinstall scripts are disabled or packages are installed manually.
If you encounter this error, backup your project and do the following:
- Remove your project's entire node_modules/ folder: rm -rf ./node_modules
- This is required as ngcc actually edits packages in the node_modules/ folder.
- Install your dependencies again: npm install
- Run our tooling before building the project: npx ngnes
- Now continue on to build and run your project: npx ng serve
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.
- Note: Please do not ever share your full NES Access Token. No one from the NES team should ever ask for an entire token, even for troubleshooting purposes.
- Security Note: Please do not include any sensitive or otherwise confidential information in your email. We take great pride in being a security focused organization, and one way we help protect our customers is by limiting the information we have access to.