Angular-cli: ng update @angular/cli 因 npm 链接的模块而失败

创建于 2018-05-09  ·  1评论  ·  资料来源: angular/angular-cli

版本

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    

我有一个项目,它使用npm link来拉入共享库“@teachtown/shared”^,这是 TS 源代码,未转译/打包为 JS。 目的是该库将在多个项目中使用。

^ “@” 后的空格,以便 github 不会尝试解析为用户/项目

我正在尝试按照https://update.angular.io/ 上提供的说明升级消费项目 Angular 5.2.5 => 6

我完成了以下步骤,但出现错误:

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

> Not found : @teachtown/shared

(旁白:我必须将第二个命令更新为npm install @angular/cli --save-dev才能在我的项目中正确更新 CLI。)

请注意,@teachtown/shared 确实存在:

$ ls node_modules/<strong i="19">@teachtown</strong>
> shared

重现步骤

见上面的描述

观察到的行为

见上面的描述

期望的行为

以下之一:

  • Angular CLI 以源代码形式提供对共享项目的支持。
  • 更新过程识别共享项目(通过检测 package.json?)并提供包含为/转换为库的选项,因为 CLI 现在支持ng generate library

提及可能有用的任何其他详细信息(可选)

schematicupdate low broken triage #1 bufix

最有用的评论

我们在私人仓库中使用库,这些库因“未找到”而失败
我们可以有办法忽略这些并继续吗?

>所有评论

我们在私人仓库中使用库,这些库因“未找到”而失败
我们可以有办法忽略这些并继续吗?

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

jmurphzyo picture jmurphzyo  ·  3评论

gotschmarcel picture gotschmarcel  ·  3评论

jbeckton picture jbeckton  ·  3评论

delasteve picture delasteve  ·  3评论

sysmat picture sysmat  ·  3评论