TypeDoc找不到Angular2模块 [英] TypeDoc can not find Angular2 modules

查看:256
本文介绍了TypeDoc找不到Angular2模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用TypeDoc生成的DOC文件。当我运行TypeDoc与follwing命令:

I am trying to generate doc files by using TypeDoc. When I run TypeDoc with the follwing command:

/node_modules/.bin/typedoc --module system --target ES5 --exclude *.spec.ts* --experimentalDecorators --out typedoc app/ --ignoreCompilerErrors

这使作为输出:

Using TypeScript 1.6.2 from /development/node_modules/typedoc/node_modules/typescript/lib
Error: /development/app/angular2/app.ts(1)
 Cannot find module 'angular2/core'.
Error: /development/app/angular2/app.ts(2)
 Cannot find module 'angular2/upgrade'.
Error: /development/app/angular2/app.ts(3)
 Cannot find module 'angular2/platform/browser'.
Error: /development/app/angular2/app.ts(5)

tsconfig.json

{
  "compilerOptions": {
    "target": "ES5",
    "module": "system",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false
  },
  "exclude": [
    "node_modules"
  ]
}

是否有某种参数我很想念这里包括库或 .d.ts。文件?

推荐答案

我试图与CommonJS的模块和它的工作。

I tried with the commonjs module and it worked.

typedoc --experimentalDecorators --target 'es5' --module 'commonjs' --out doc-destination/ src/

这篇关于TypeDoc找不到Angular2模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆