Open
Description
🐞 Bug report
Command (mark with an x
)
- add
Is this a regression?
Unknown
Description
ng add
fails to look at the custom registry definition. If I run with ng add
it fails due to look for the package in registry.npmjs.org. If I instead just yarn install
it looks at the custom registry from the vendor.
🔬 Minimal Reproduction
ng new repo
cd repo
yarn set version berry
yarn install
ng add @infragistics/igniteui-angular
🔥 Exception or Error
$ ng add @infragistics/igniteui-angular --verbose
- Determining package manager...
i Using package manager: yarn
- Searching for compatible package version...
Locating potential npmrc files:
Locating potential yarnrc files:
Trying 'C:\Users\xyz\.yarnrc'...found.
Trying 'C:\Users\xyz\.yarnrc'...found.
× Unable to load package information from registry: request to https://registry.npmjs.org/@infragistics%2figniteui-angular failed, reason: connect ETIMEDOUT 104.16.25.35:443
So you can see that while it's using yarn, it's somehow avoiding the ~/.yarnrc.yml
file.
🌍 Your Environment
Angular CLI: 13.1.4
Node: 16.13.0
Package Manager: yarn 3.2.1
OS: win32 x64
Angular:
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1301.4 (cli-only)
@angular-devkit/build-angular
@angular-devkit/core 13.1.4 (cli-only)
@angular-devkit/schematics 13.1.4 (cli-only)
@angular/cli 13.1.4 (cli-only)
@schematics/angular 13.1.4 (cli-only)
rxjs 6.6.7 (cli-only)
typescript 4.5.4 (cli-only)
Anything else relevant?
My ~/.angular-config.json files specifies to use yarn
$ cat ~/.angular-config.json
{
"version": 1,
"cli": {
"analytics": false,
"packageManager": "yarn",
"completion": {
"prompted": true
}
}
}
If I just straight-up run a yarn install
of that package, it works without issue, showing that my yarn configuration is set up properly as far as a proxy, the registry for that prefix, etc...
$ yarn add @infragistics/igniteui-angular
➤ YN0000: ┌ Resolution step
➤ YN0032: │ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ nice-napi@npm:1.0.2: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ node-addon-api@npm:3.2.1: Implicit dependencies on node-gyp are discouraged
➤ YN0061: │ querystring@npm:0.2.0 is deprecated: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
➤ YN0061: │ source-map-resolve@npm:0.6.0 is deprecated: See https://github.com/lydell/source-map-resolve#deprecated
➤ YN0000: └ Completed in 7s 524ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ yallist@npm:4.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yaml@npm:1.10.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs-parser@npm:21.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:17.5.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ zone.js@npm:0.11.6 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 15s 223ms
➤ YN0000: ┌ Link step
➤ YN0031: │ One or more node_modules have been detected and will be removed. This operation may take some time.
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0007: │ @angular/cli@npm:13.1.4 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:3.19.3 must be built because it never has been before or the last one failed
➤ YN0007: │ esbuild@npm:0.14.11 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 14s 764ms
➤ YN0000: Done with warnings in 37s 708ms