JSPM / SystemJS 找不到 source-map-support.js

JSPM / SystemJS can't find source-map-support.js

首先我不得不说,我正在努力让 JSPM + SystemJS + TypeScript + Angular 一起工作。在这里发布我的所有文件会有点太多,但我可以说的是我可以导入通过默认转译器编译的标准 JS 文件 "babel" 并且可以工作。一旦我尝试使用我的 .ts 文件,它就会中断。

我的 config.js 中有这样的东西:

  typescriptOptions: {
    "experimentalDecorators": true,
    "module": "system",
    "noImplicitAny": true,
    "target": "ES5",
    "tsconfig": false
  },
  paths: {
    "github:*": "jspm_packages/github/*",
    "npm:*": "jspm_packages/npm/*",
    "app/*": "src/*"
  },

  packages: {
    "src": {
      "main": "index",
      "format": "system",
      "defaultExtension": "ts",
      "meta": {
        "*.ts": {
          "loader": "ts"
        }
      }
    }
  },

当我尝试通过 System.import('./src/index.ts') 加载它时,我在控制台中收到错误 "source-map-support.js 404 (Not Found)"。我没有使用 source-map 或任何与之相关的东西,我试图通过 jspm 安装它但它没有帮助,我用谷歌搜索和 Whosebuged 但没有任何结果。我不知道如何调试它。

你有什么想法吗?我什至不是在寻找完美的解决方案,但从某个地方开始寻找会很棒。

非常感谢。

在调试同样的问题时,遇到了这个问题:https://github.com/frankwallis/plugin-typescript/issues/160(@aluanhaddad 的评论)

我可以确认手动安装对我有用 source-map-support

jspm install npm:source-map-support