我有一个项目是用@ and /cli构建的,还有一个由我创建的第三方库,名为NG2工具。当我安装这个库并使用@angular运行它时,我会得到以下错误
ERROR in Ng2ToolsModule is not an NgModule
但是如果我删除一个模块并将其添加回来,错误就会消失,应用程序就会运行良好。由于同样的错误,我无法构建应用程序。这里是库的链接,主分支有已发布的代码,是用角/cli构建的应用程序,在开发分支上抛出错误是源代码。我是否应该为npm发布更多的信息以避免这个错误?图书馆是如何捆绑成角2的?我正在使用gulp构建库,因此我可以将每个文件分别编译。这是app.m
我正在处理Angular 2应用程序,在尝试使用CLI创建组件时遇到错误。 命令 ng g c mycomponent 我尝试通过执行以下操作来重新安装cli,但它似乎并不真正起作用。 ng new my-project
cd my-project
ng g c my-component --m app 错误 Your global Angular CLI version (7.2.2) is greater than your local
version (6.0.8). The local Angular CLI version is used.
To disable this war
当使用ng g c my-component生成一个新组件时,我会得到以下错误:
找不到NgModule。使用skip选项在NgModule中跳过导入。
如果我然后使用跳过导入选项角将在我的e2e文件夹中生成组件。
我假设这与我的angular.json文件有关,该文件在我运行ng升级之前曾被称为angular-cli.json,这无疑是造成问题的原因,因为似乎出现了一些结构性变化。
有没有办法解决这个问题,而不使用CLI创建一个新项目,然后手动复制文件..?
ng g c从根“my”文件夹中运行。
文件夹结构:
my-app
- dist
- e2e
- node_module
我正在处理Angular 6应用程序,并尝试使用命令行界面来创建新组件,使用'ng g c myComponent‘,但遇到错误 我的所有组件都在app /的module文件夹下(根级组件) 错误 Could not find an NgModule. Use the skip-import option to skip importing in NgModule. 警告消息 Your global Angular CLI version (7.2.2) is greater than your local
version (6.2.9). The local Angular C
我有一个应用程序,它的开发已经完成。现在,当我运行命令ng build时,一切都很顺利&很好。但是当我运行这个命令时 ng build --prod --base-href /Incrency/ 它显示了登录页面,但当我登录时,它抛出以下错误。 ERROR Error: Uncaught (in promise): Error: No component factory found for t.
Did you add it to @NgModule.entryComponents?
Error: No component factory found for t. Did you
遵循正式文档实现虚拟视图,但在html组件中获得以下错误消息:
错误消息
'cdk-virtual-scroll-viewport' is not a known element:
1. If 'cdk-virtual-scroll-viewport' is an Angular component, then verify that it is part of this module.
2. If 'cdk-virtual-scroll-viewport' is a Web Component then add 'CUSTOM_ELEM
我想要创建一个简单的组件并将其包含在页面中。我用ionic g component my-header (离子-cli v3 beta)创建了它,修复了IonicPageModule错误,然后添加到另一个页面。然后我得到这个错误:
Error: Uncaught (in promise): Error: Template parse errors:
'my-header' is not a known element:
1. If 'my-header' is an Angular component, then verify that it is part o
我的angular版本是这样的:Angular cli version 我创建了一个组件,它的名称是Register,我运行ng serve整个angular项目抛出异常,如下所示: ERROR in src/app/app.module.ts:21:5 - error NG6001: Cannot declare 'ReactiveFormsModule' in an NgModule as it's not a part of the current compilation. 它的错误图片是:Error Photo 有人能帮我吗?
我有一个angular 8项目,当我启用angular Ivy时,它在编译时会失败。当我检查其他人提供的解决方案并更新到angular 8.1.0(从8.0.3),但问题仍然存在,并不断给我以下错误:
D:\Users\Backup>ng build shared
Building Angular Package
Building entry point 'shared'
Compiling TypeScript sources through ngc
BUILD ERROR
node_modules/@angular/common/common.d.ts(115,22
我正试图完成一个从“从理论到实践的角度”的练习--亚辛·侯赛因( Asim )
作为对我自己的挑战,我正试图向前迈进一步,使用角CLI重构应用程序,而不是在同一个文件中编写所有组件;请参阅书中的示例,但该应用程序正在崩溃。到目前为止,我已经创建了两个新组件
// JokeComponent
import { Component, NgModule, OnInit, Input } from '@angular/core';
class Joke {
public setup: string;
public punchline: string;
public hi
我正在学习关于角5的在线教程,使用Visual代码和最新的角版本:
角CLI: 7.0.6
节点: 10.7.0
角度: 7.0.4,
VS代码不会引发任何错误,但是当我在inputText中添加(InputText)=“inputText”时,浏览器控制台会显示一个错误:
错误:模板解析错误:
Can't bind to 'ngModule' since it isn't a known property of 'input'. ("<input type="text" [ER
我在使用角度材质时遇到了一些问题,现在我被卡住了。我已经得到了angular材质,可以很好地与angular的其余部分配合使用。但是,对于每个npm start命令,我都会收到警告
@angular/compiler-cli@5.0.2 requires typescript@'>=2.4.2 <2.5.0' but 2.6.1 was found instead.
Using this version can result in undefined behaviour and difficult to debug problems.
Please run the
我不确定我只遇到了ionic cordova run android --prod的问题,而且我的ionic cordova run android工作正常。
错误:
Error: Cannot determine the module for class OverlayPortal in /Users/gopi/Documents/bos/hybrid-app/node_modules/ionic-angular/es2015/components/app/overlay-portal.d.ts! Add OverlayPortal to the NgModule to fix it.
Ca