Angular-cli: ng update @angular/cli fails with npm link'ed module

Created on 9 May 2018  ·  1Comment  ·  Source: angular/angular-cli

Versions

Angular CLI: 6.0.0
Node: 9.5.0
OS: darwin x64
Angular: 5.2.5
... animations, cdk, common, compiler, compiler-cli, core, forms
... http, language-service, material, platform-browser
... platform-browser-dynamic, platform-server, router

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.6.0
@angular-devkit/core         0.6.0
@angular-devkit/schematics   0.6.0
@angular/cli                 6.0.0
@schematics/angular          0.6.0
@schematics/update           0.6.0
rxjs                         5.5.6
typescript                   2.5.3    

I have a project which uses npm link to pull in a shared library "@ teachtown/shared"^, which is TS source code, not transpiled / packaged as JS. The intention is that this library will be used in multiple projects.

^ space after "@" so that github doesn't try to parse as user/project

I'm trying to upgrade the consuming project, Angular 5.2.5 => 6, following the instructions provided on https://update.angular.io/.

I reached the following steps, and got an error:

npm install -g @angular/cli
npm install @angular/cli
ng update @angular/cli

> Not found : @teachtown/shared

(Aside: I had to update the second command to npm install @angular/cli --save-dev for it to properly update CLI in my project.)

Note that @ teachtown/shared does exist:

$ ls node_modules/@teachtown
> shared

Repro steps

see above description

Observed behavior

see above description

Desired behavior

One of the following:

  • Angular CLI provides support for shared projects in source form.
  • Update process recognizes the shared project (by detection of package.json?) and offers option to include as / convert to a library, since CLI now supports ng generate library.

Mention any other details that might be useful (optional)

schematicupdate low broken triage #1 bufix

Most helpful comment

We are using libraries in a private repo these fail with "not found"
Can we have a way to ignore these and carry on?

>All comments

We are using libraries in a private repo these fail with "not found"
Can we have a way to ignore these and carry on?

Was this page helpful?
0 / 5 - 0 ratings