angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

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

Open supdegrave opened this issue 7 years ago • 1 comments

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)

supdegrave avatar May 09 '18 09:05 supdegrave

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

MrAntix avatar May 31 '18 15:05 MrAntix

I'm sorry, but we can't reproduce the problem following the instructions you provided. Remember that we have a large number of issues to resolve, and have only a limited amount of time to reproduce your issue. Short, explicit instructions make it much more likely we'll be able to reproduce the problem so we can fix it.

If the problem persists, please open a new issue following our submission guidelines.

A good way to make a minimal repro is to create a new app via ng new repro-app and add the minimum possible code to show the problem. Then you can push this repository to github and link it here.

alan-agius4 avatar Nov 14 '22 10:11 alan-agius4

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.