:巴貝爾6:參數太多,當我嘗試運行我的服務器,它使用巴貝爾6,我收到以下錯誤傳遞錯誤
Error: /path/to/myapp/server.js: t.Identifier: Too many arguments passed. Received 3 but can receive no more than 1
這裏是我的package.json
是什麼樣子:
{
"scripts": {
"start": "node app.js",
"postinstall": "bash ./scripts/npm-post.sh",
"test": "mocha test"
},
"dependencies": {
"babel": "^6.0.15",
"babel-core": "^6.0.20",
"babel-preset-react": "^6.0.15",
"babel-preset-stage-0": "^6.0.15",
"react": "^0.14.2",
"react-dom": "^0.14.2",
"react-helmet": "^2.1.1",
"react-router": "^1.0.0-rc3",
"reactify": "^1.1.1",
},
"devDependencies": {
"babel-preset-es2015": "^6.0.15",
}
}
這是我的app.js
require('babel-core/register')({
"presets": [
"es2015",
'react'
]
});
require('./server.js')
和server.js
console.log('hi')
hi
未打印到控制檯。