app.component.ts不在tsconfig.json定义的项目中

奔腾10

所以我得到这个错误:

文件C:/wamp/www/angular2_demo/GiphySearch/src/app/app.component.ts 不在C:/ wamp / www / angular2_demo / GiphySearch / e2e / tsconfig.json定义的项目中

我的文件夹结构是

/
/e2e/tsconfig.json
/src
(others)

tsconfig.js拥有此内容

{
  "compileOnSave": false,
  "compilerOptions": {
    "declaration": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "mapRoot": "",
    "module": "commonjs",
    "moduleResolution": "node",
    "noEmitOnError": true,
    "noImplicitAny": false,
    "rootDir": ".",
    "sourceMap": true,
    "sourceRoot": "/",
    "target": "es5"
  }
}

我尝试将rootDirorsourceRoot定义为as../../srcor,/src但没有任何效果。应该如何正确配置?

斯克兰博

如tsconfig.json文档中所定义

目录中存在tsconfig.json文件,表明该目录是TypeScript项目的根目录。

您将tsconfig.json在e2e目录中,而不是src目录中,该位置应根据上面的链接显示。

我还注意到您"sourceRoot": "/",会对其进行更改以提供./帮助吗?

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Codekit 无法在 angular v5 项目中编译 main.ts 和 app.component.spec.ts

来自分类Dev

来自 app.component.ts 的 Angular 路由

来自分类Dev

iPad App显示不在项目中的奇怪图标

来自分类Dev

iPad App显示不在项目中的奇怪图标

来自分类Dev

使用的角度app.component.ts jQuery代码

来自分类Dev

app.component.ts 的生命周期事件

来自分类Dev

在我的 app.component.ts 中添加 2 个组件

来自分类Dev

app.component.ts 和页面中的离子组件

来自分类Dev

app.component.ts OnInit 被调用 11 次的正常行为?

来自分类Dev

src/app/app.component.ts(72,69) 中的错误:错误 TS1005:“,”预期

来自分类Dev

找不到 ./src/app/svg.component.ts 模块中的错误:错误:无法解析“./svg.component.svg”

来自分类Dev

tsconfig.json-仅从文件夹构建ts文件

来自分类Dev

ts-node 正在改变 tsconfig.json 文件

来自分类Dev

从另一个组件调用 App.component.ts 方法

来自分类Dev

升级 app.component.ts @angular/router 和 nativescript-angular/router 的问题

来自分类Dev

在 angular4 的 app.component.ts 文件中使用外部库变量

来自分类Dev

在 Angular 7 中获取错误 ./src/app/app.component.ts 模块未找到:错误:无法解析

来自分类Dev

如何在angular2项目中创建tsconfig.json文件?

来自分类Dev

将nguniversal / express-engine添加到Angular项目中:“在/src/app/app.module.ts中找不到BrowserModule导入”

来自分类Dev

在 ' npm test login.component.spect.ts ' 上,它说从 'login.component.ts' 找不到模块 '@app/store/user/user.actions'

来自分类Dev

Angular ngx-editor 从其他 components.ts 文件中的 app.component.ts 外包配置

来自分类Dev

在 App Engine 项目中创建文件

来自分类Dev

Angular 7 Cli 不在 Ionic 4 项目中应用 angular.json 原理图选项

来自分类Dev

清单项目中的Vue Component Select选项

来自分类Dev

如何在 create-react-app 项目中使用 Service Worker 制作自定义离线页面?

来自分类Dev

从angular -oidc-client中的app.component获取数据时,this.user是未定义的

来自分类Dev

TSLint抱怨@Component的module.id“ tsconfig.json中未包含相应文件”(在WebStorm中)

来自分类Dev

Angular2 将存储在变量中的数据从 app.component.ts(父组件)传送到其他组件

来自分类Dev

Eclipse不在Maven项目中提示

Related 相关文章

  1. 1

    Codekit 无法在 angular v5 项目中编译 main.ts 和 app.component.spec.ts

  2. 2

    来自 app.component.ts 的 Angular 路由

  3. 3

    iPad App显示不在项目中的奇怪图标

  4. 4

    iPad App显示不在项目中的奇怪图标

  5. 5

    使用的角度app.component.ts jQuery代码

  6. 6

    app.component.ts 的生命周期事件

  7. 7

    在我的 app.component.ts 中添加 2 个组件

  8. 8

    app.component.ts 和页面中的离子组件

  9. 9

    app.component.ts OnInit 被调用 11 次的正常行为?

  10. 10

    src/app/app.component.ts(72,69) 中的错误:错误 TS1005:“,”预期

  11. 11

    找不到 ./src/app/svg.component.ts 模块中的错误:错误:无法解析“./svg.component.svg”

  12. 12

    tsconfig.json-仅从文件夹构建ts文件

  13. 13

    ts-node 正在改变 tsconfig.json 文件

  14. 14

    从另一个组件调用 App.component.ts 方法

  15. 15

    升级 app.component.ts @angular/router 和 nativescript-angular/router 的问题

  16. 16

    在 angular4 的 app.component.ts 文件中使用外部库变量

  17. 17

    在 Angular 7 中获取错误 ./src/app/app.component.ts 模块未找到:错误:无法解析

  18. 18

    如何在angular2项目中创建tsconfig.json文件?

  19. 19

    将nguniversal / express-engine添加到Angular项目中:“在/src/app/app.module.ts中找不到BrowserModule导入”

  20. 20

    在 ' npm test login.component.spect.ts ' 上,它说从 'login.component.ts' 找不到模块 '@app/store/user/user.actions'

  21. 21

    Angular ngx-editor 从其他 components.ts 文件中的 app.component.ts 外包配置

  22. 22

    在 App Engine 项目中创建文件

  23. 23

    Angular 7 Cli 不在 Ionic 4 项目中应用 angular.json 原理图选项

  24. 24

    清单项目中的Vue Component Select选项

  25. 25

    如何在 create-react-app 项目中使用 Service Worker 制作自定义离线页面?

  26. 26

    从angular -oidc-client中的app.component获取数据时,this.user是未定义的

  27. 27

    TSLint抱怨@Component的module.id“ tsconfig.json中未包含相应文件”(在WebStorm中)

  28. 28

    Angular2 将存储在变量中的数据从 app.component.ts(父组件)传送到其他组件

  29. 29

    Eclipse不在Maven项目中提示

热门标签

归档