错误:(SystemJS)[BABEL] unknown:未知选项:direct.0

时间:2017-02-02 00:59:14

标签: npm babeljs versioning systemjs jspm

我很喜欢 jspm 以及所有这些 SystemJS 和转发事件。

我创建了 Express.js - Angular 应用,它在我的Linux Mint上运行没有问题。

在我朋友的Mac上,以及在旧的Windows电脑上,这会在浏览器控制台中弹出:

Error: (SystemJS) [BABEL] unknown: Unknown option: direct.0
    ReferenceError: [BABEL] unknown: Unknown option: direct.0
        at Logger.error (http://localhost:3000/jspm_packages/npm/babel-core@5.8.24/browser.js:11516:11)
        at OptionManager.mergeOptions (http://localhost:3000/jspm_packages/npm/babel-core@5.8.24/browser.js:12024:29)
        at OptionManager.init (http://localhost:3000/jspm_packages/npm/babel-core@5.8.24/browser.js:12114:10)
        at File.initOptions (http://localhost:3000/jspm_packages/npm/babel-core@5.8.24/browser.js:10754:75)
        at new File (http://localhost:3000/jspm_packages/npm/babel-core@5.8.24/browser.js:10744:22)
        at Pipeline.transform (http://localhost:3000/jspm_packages/npm/babel-core@5.8.24/browser.js:16076:16)
    Error loading http://localhost:3000/src/boot/boot.js
        at Logger.error (http://localhost:3000/jspm_packages/npm/babel-core@5.8.24/browser.js:11516:11)
        at OptionManager.mergeOptions (http://localhost:3000/jspm_packages/npm/babel-core@5.8.24/browser.js:12024:29)
        at OptionManager.init (http://localhost:3000/jspm_packages/npm/babel-core@5.8.24/browser.js:12114:10)
        at File.initOptions (http://localhost:3000/jspm_packages/npm/babel-core@5.8.24/browser.js:10754:75)
        at new File (http://localhost:3000/jspm_packages/npm/babel-core@5.8.24/browser.js:10744:22)
        at Pipeline.transform (http://localhost:3000/jspm_packages/npm/babel-core@5.8.24/browser.js:16076:16)
    Error loading http://localhost:3000/src/boot/boot.js

知道那里发生了什么吗?

我一直在摆弄babel / jspm config.js / npm package.json的版本,谁知道我可能在某些时候已接近解决方案,但我不知道I'm doing及其原因。

这些是(希望)相关的部分 的的package.json

{
  "scripts": {
    "postinstall": "jspm install",
    "serve": "node ./bin/www"
  },
  "dependencies": {
    // ...
  },
  "devDependencies": {
    // ...
    "jspm": "^0.16.48"
  },
  "jspm": {
    "directories": {
      "baseURL": "app",
      "lib": "app/src"
    },
    "dependencies": {
      // ...
    },
    "devDependencies": {
      "-a": "npm:babel-core@5.8.24",
      "-a-runtime": "npm:babel-runtime@5.8.24",
      "core-js": "npm:core-js@1.1.4",
      "traceur": "github:jmcriffey/bower-traceur@0.0.92",
      "traceur-runtime": "github:jmcriffey/bower-traceur-runtime@0.0.92"
    }
  }
}

...和 config.js

System.config({
  defaultJSExtensions: true,
  transpiler: "-a",
  paths: {
    "app/*": "src/*.js",
    "github:*": "jspm_packages/github/*",
    "npm:*": "jspm_packages/npm/*"
  },

  map: {
    "-a": "npm:babel-core@5.8.24",
    "-a-runtime": "npm:babel-runtime@5.8.24",
    // ...
    "core-js": "npm:core-js@1.2.7",
    "css": "github:systemjs/plugin-css@0.1.32",
    "json": "github:systemjs/plugin-json@0.1.2",
    "text": "github:systemjs/plugin-text@0.0.4",
    "traceur": "github:jmcriffey/bower-traceur@0.0.92",
    "traceur-runtime": "github:jmcriffey/bower-traceur-runtime@0.0.92",
    "npm:babel-runtime@5.8.24": {
      "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:core-js@1.2.7": {
      "fs": "github:jspm/nodelibs-fs@0.1.2",
      "path": "github:jspm/nodelibs-path@0.1.0",
      "process": "github:jspm/nodelibs-process@0.1.2",
      "systemjs-json": "github:systemjs/plugin-json@0.1.2"
    }
  }
});

请停止

0 个答案:

没有答案