- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我想在我的项目中使用 Angular-Bootstrap,所以我查找了有关如何下载和安装它并使其在我的计算机上运行的教程。我为此使用 Visual Studio Code。我找到了一个关于如何做到这一点的教程,就是这个:
https://github.com/mdbootstrap/Angular-Bootstrap-with-Material-Design
我做了提到的每一步,但每当我想“ng start”或“ng build”时,我都会收到这个奇怪的错误;基本上每当我想编译时,我都会收到这个错误:
bootstrap-weather@0.0.0 build C:\Users\Il\Desktop\WebFrameworks\Opdrachten\AngularBootstrapWeather\BootstrapWeather
> ng build
Date: 2017-11-07T16:19:07.296Z
Hash: d517558fb7e8e3484d3d
Time: 9269ms
chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 5.83 kB [entry] [rendered]
chunk {main} main.bundle.js, main.bundle.js.map (main) 8.17 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 200 kB [initial] [rendered]
chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 465 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.29 MB [initial] [rendered]
ERROR in ./node_modules/angular-bootstrap-md/index.ts
Module build failed: Error: C:\Users\Il\Desktop\WebFrameworks\Opdrachten\AngularBootstrapWeather\BootstrapWeather\node_modules\angular-bootstrap-md\index.ts is not part
of the compilation output. Please check the other error messages for details.
at AngularCompilerPlugin.getCompiledFile (C:\Users\Il\Desktop\WebFrameworks\Opdrachten\AngularBootstrapWeather\BootstrapWeather\node_modules\@ngtools\webpack\src\an
gular_compiler_plugin.js:629:23)
at plugin.done.then (C:\Users\Il\Desktop\WebFrameworks\Opdrachten\AngularBootstrapWeather\BootstrapWeather\node_modules\@ngtools\webpack\src\loader.js:467:39)
at process._tickCallback (internal/process/next_tick.js:109:7)
@ ./src/app/app.module.ts 9:0-58
@ ./src/main.ts
@ multi ./src/main.ts
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files (x86)\\Brackets\\node.exe" "C:\\Program Files (x86)\\Brackets\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.11.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! bootstrap-weather@0.0.0 build: `ng build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap-weather@0.0.0 build script 'ng build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bootstrap-weather package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ng build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bootstrap-weather
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bootstrap-weather
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Il\Desktop\WebFrameworks\Opdrachten\AngularBootstrapWeather\BootstrapWeather\npm-debug.log
The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it.
它给出了一个奇怪的错误,说“index.ts”不是编译的一部分......当我查看 Angular-Bootstrap-Md 本身的“tsconfig.json”文件时,我看到了这个:
{
"compilerOptions": {
"outDir": "../../../../dist/angular-bootstrap-md/free",
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"inlineSources": true,
"noEmitHelpers": false,
"noImplicitAny": false,
"declaration": true,
"skipLibCheck": false,
"stripInternal": true,
"allowSyntheticDefaultImports": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"lib": ["dom", "es6"]
},
"exclude": [
"node_modules"
],
"files": [
"./index.ts"
],
"angularCompilerOptions": {
"genDir": "../temp/factories",
"strictMetadataEmit": true,
"skipTemplateCodegen": true
}
}
“Index.ts”显然包含在内,因为它是"file"正文的一部分。那么,为什么明明是“编译的一部分”却说它不是“编译的一部分”?我该如何修复这个错误,以便 Bootstrap 最终可以在我的电脑上运行?而且,我不知道这是否值得一提,但我的“app.module.ts”看起来像这样:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
import { MDBBootstrapModule } from 'angular-bootstrap-md';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
MDBBootstrapModule.forRoot()
],
providers: [],
schemas: [ NO_ERRORS_SCHEMA ],
bootstrap: [AppComponent]
})
export class AppModule { }
最佳答案
将其包含在 tsconfig.app.json
"include": [
"**/*.ts",
"../node_modules/angular-bootstrap-md/index.ts"
],
或
刚跑过
ng serve --prod
关于javascript - "angular-bootstrap-md\index.ts is not part of the compilation output",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47163064/
我在运行 compile test:compile it:compile经常并且...希望将击键次数减少到类似 *:compile 的数量。 .不过,它似乎不起作用。 $ sbt *:compile
有人可以给我这个问题的提示(或整个解决方案!): 在 Clojurescript 项目中,如何自动将编译日期/时间硬编码在符号中,以便在使用应用程序时显示? 谢谢。 最佳答案 有多种解决方案: 使用l
我是 ember.js 框架的新手,使用 ruby on rails 和 ember.debug.js -v 1.10.1(最新版本)。我一直在网上看到 ember 更改了这个最新的补丁,但我不知
我不是 Fortran 程序员(只是短暂的经验),但我需要编译一个部分用 F77 编写的程序。在我之前有人用 Absoft 编译器编译过它,但现在我需要在另一台机器上用 g77 重复这个过程。对于 A
我运行命令 mvn clean package 我得到了上面的错误我的 pom 是: http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0
我有以下问题。 我想在测试编译阶段排除一些.java文件(** / jsfunit / *。java),另一方面,我想在编译阶段包括它们(id我使用tomcat启动tomcat:运行目标) ) 我的p
符合 wikipedia A compiler is a computer program (or set of programs) that transforms source code writt
我想构建项目,但出现如下错误: 无法执行目标 org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile
当我通过右键单击项目名称进行 Maven 安装时,出现以下错误: [INFO] Scanning for projects... [WARNING] [WARNING] Some proble
我是 Maven 的新手,我想将我的应用程序导入到 Maven。和以前一样,我想将我的 ejb 项目中的类引用到我的 war 项目中。我在类中没有错误,但是如果我在我的父项目上安装 maven,那么我
当我将 ASP.NET Web 应用程序部署到生产环境时,我使用配置转换来删除 debug="true"来自 .但是,就在今天,我注意到 web.config 中的另一个部分如下所示:
This question already has answers here: Maven Compilation Error: (use -source 7 or higher to enable
我正在使用 Maven 3.0.5 和 Spring Tool Source 3.2 并安装了 Maven 插件。当我尝试执行“运行方式---> Maven 安装”时,出现以下错误: [INFO] S
我试图用 AngularJS 创建我自己的递归指令,它调用自己以漂亮的 JSON 格式转换 View 中的对象。好吧,首先我使用 ng-include 调用带有模板的脚本,在其中使用 ng-if 验证
可以通过 @suppress annotation使用Google的Closure Compiler在每个文件的基础上禁止显示警告。但是,似乎无法同时抑制多个警告-例如globalThis和check
假设一个拥有 10 到 20 年经验的熟练开发人员从未构建过编译器或模拟器,哪一个会更具挑战性? 你能比较一下会成为障碍的问题吗? 谢谢。 最佳答案 仿真和编译是完全不同的,但由于两者都被认为是“低级
最近发现Vim中有一个命令叫compiler。您可以使用任何常见的编译器(例如,:compiler gcc、:compiler php 等)来调用它,但它似乎没有任何立竿见影的效果。 我在联机帮助页上
我试图从 spring.io 指南中部署最简单的应用程序 Guide 但是我有一些麻烦.. 我做了什么: 创建的项目。 (来自 spring.io 教程) 下载 heroku CLI 在 Intell
每当进行 Maven Build..>clean install 时,我都会遇到此错误。我尝试过使用不同版本的插件并添加 testFailureIgnore 属性,但问题仍然存在。请找到下面的 POM
我有一个 web 应用程序,我尝试使用 maven 进行编译,不幸的是,在执行 mvn clean package 时它不起作用。 stackoverflow 上有很多问题看起来都一样,但没有解决了我
我是一名优秀的程序员,十分优秀!