【问题标题】:Namespace 'Ember' has no exported member 'RSVP'命名空间“Ember”没有导出成员“RSVP”
【发布时间】:2017-09-07 02:29:11
【问题描述】:

我正在使用带有 Ember 的打字稿,当我突然开始收到此错误时,一切正常。 下面是 tsconfig.json - (自从我上次知道它工作并签入以来没有任何改变)

{
  "compilerOptions": {
    "importHelpers": true,
    "target": "ES6",
    "allowJs": true,
    "moduleResolution": "node",
    "noEmitOnError": true,
    "noEmit": false,
    "emitDecoratorMetadata": false,
    "experimentalDecorators": true,
    "noEmitHelpers": true,
    "baseUrl": ".",
    "paths": {
      "****/config/*": ["config/*"],
      "****/tests/*": ["tests/*"],
      "****/*": ["app/*"],
      "****/common/*": ["common/*"],
      "npm:*": ["local-types/*"],
      "*": ["local-types/*"],
      "tslib": ["node_modules/tslib/*"]
    },
    "typeRoots": [
      "bower_components"
    ],
    "watch": false
  },
  "include": [
    "app/**/*.ts",
    "tests/**/*.ts",
    "mirage/**/*.ts",
    "common/**/*.ts"
  ]
}

tsc --version 2.2.1版

以前有没有其他人遇到过这种情况?我现在好几个小时都一无所知。

【问题讨论】:

  • 为什么你认为问题出在你的tsconfig.json?
  • 我现在不确定是什么问题。 Ember 可能会有所改变。
  • 如果您更新了任何依赖项,请查看更改日志并查看是否有任何 api 被弃用/更改。仅凭您在这里给我们的信息,几乎不可能分辨出哪里出了问题。

标签: typescript ember.js ember-cli


【解决方案1】:

原来这是一个 Ember 更新问题,而不是 TypeScript。决定不升级并在此时进行重大更改修复了该问题。 ps - 从 package.json 中删除所有 ^ 以阻止它自动升级包。

【讨论】:

  • 你可能想试试yarnpkg.com,它会自动“锁定”你所有的依赖项
猜你喜欢
  • 1970-01-01
  • 2018-03-16
  • 2021-06-05
  • 2021-04-05
  • 1970-01-01
  • 2023-03-13
  • 1970-01-01
  • 1970-01-01
  • 2021-12-24
相关资源
最近更新 更多