Npm 错误:(SystemJS)[BABEL]未知:未知选项:直接。0
我对jspm和所有这些SystemJS和transpiling的东西都很陌生 我已经创建了这个Express.js-Angular应用程序,它在我的Linux Mint上运行没有问题 不过,在我朋友的Mac电脑上,以及在我的旧Windows电脑上,浏览器控制台会弹出这样的对话框:Npm 错误:(SystemJS)[BABEL]未知:未知选项:直接。0,npm,babeljs,versioning,systemjs,jspm,Npm,Babeljs,Versioning,Systemjs,Jspm,我对jspm和所有这些SystemJS和transpiling的东西都很陌生 我已经创建了这个Express.js-Angular应用程序,它在我的Linux Mint上运行没有问题 不过,在我朋友的Mac电脑上,以及在我的旧Windows电脑上,浏览器控制台会弹出这样的对话框: Error: (SystemJS) [BABEL] unknown: Unknown option: direct.0 ReferenceError: [BABEL] unknown: Unknown opti
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
知道那里发生了什么吗
我一直在玩弄config.js
/jspm和package.json
/npm中的babel
版本,谁知道呢,我可能在某个时候接近解决方案,但我真的不知道是什么和为什么
这些是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"
}
}
}
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"
}
}
});
…和config.js:
{
"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"
}
}
}
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"
}
}
});
请停下来你想出解决办法了吗?