在heroku上部署时,我收到以下错误:
npm ERR! Tell the author that this fails on your system:
npm ERR! babel-node server/app.js --presets es2015,stage-2
我的package.json:
"scripts": {
"start": "babel-node server.js --presets es2015,stage-2",
"dev": "webpack -d --watch",
"build": "webpack -p",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"babel-cli": "^6.24.1",
"body-parser": "^1.17.2",
"express": "^4.15.3",
"morgan": "^1.8.2",
"path": "^0.12.7",
"pg": "^7.0.2",
"pg-hstore": "^2.3.2",
"sequelize": "^4.4.2"
},
"devDependencies": {
"axios": "^0.16.2",
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"css-loader": "^0.28.4",
"extract-text-webpack-plugin": "^3.0.0",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-router": "^4.1.2",
"react-router-dom": "^4.1.2",
"sass-loader": "^6.0.6",
"style-loader": "^0.18.2",
"webpack": "^3.4.1"
}
我发现了一篇帖子,建议将babel.cli放入依赖关系中,而不是放入dev依赖关系,但这不起作用。有人有想法吗? 谢谢!