小编Mee*_*ana的帖子

index.ts不是编译输出的一部分

我正在尝试编译我的Angular应用程序并收到错误.似乎是编译器没有识别index.ts文件.我不知道为什么.

以下是错误:

ERROR in ./node_modules/datatable/index.ts
Module build failed: Error: node_modules\datatable\index.ts is not part of the compilation output. Please check the other error messages for details.
    at AngularCompilerPlugin.getCompiledFile (node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:629:23)
    at plugin.done.then (node_modules\@ngtools\webpack\src\loader.js:467:39)
    at process._tickCallback (internal/process/next_tick.js:103:7)
 @ ./src/main/ui/app/app.module.ts 13:0-59
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
ERROR in ./node_modules/typeahead/index.ts
Module build failed: Error: node_modules\typeahead\index.ts is not part of the compilation output. Please check the other error messages for details.
    at AngularCompilerPlugin.getCompiledFile (\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:629:23)
    at plugin.done.then (node_modules\@ngtools\webpack\src\loader.js:467:39)
    at process._tickCallback (internal/process/next_tick.js:103:7)
 @ ./src/main/ui/app/app.module.ts 12:0-59
 @ ./src/main.ts …
Run Code Online (Sandbox Code Playgroud)

compiler-errors compilation angular

7
推荐指数
2
解决办法
7259
查看次数

DOMParser Typescript-解析HTML

我在使用DOMParser时遇到了一些麻烦。我正在使用intelliJ IDE并用Typescript编写。

这是我的代码:

  public domparser = new DOMParser();
  this.domdoc = this.domparser.parseFromString(this.xmlDoc, 'text/xml');
  console.log("domdoc: " + this.domdoc);
Run Code Online (Sandbox Code Playgroud)

domdoc: [object XMLDocument]在控制台中看到 。

关于如何打印XML文档而不只是“ [object XMLDocument]”的任何建议?

谢谢。

intellij-idea domparser typescript angular

5
推荐指数
1
解决办法
4527
查看次数