Options {"loose":true} which does not accept options
Yang03 opened this issue · comments
Error: Options {"loose":true} passed to xx/node-express/node_modules/babel-preset-env/lib/index.js which does not accept options.
(While processing preset: "xx/node-express/node_modules/babel-preset-env/lib/index.js")
(While processing preset: "xx/node-express/node_modules/babel-preset-env/lib/index.js")
node version: 8.4.0
package.json:
"devDependencies": {
"babel-cli": "^6.3.17",
"babel-core": "^6.3.15",
"babel-preset-env": "^1.6.0",
"babel-register": "^6.24.1",
"express": "^4.13.3",
"nodemon": "^1.11.0"
}
.babelrc
{
"presets": [
["env", {
"targets": {
"node": "current"
}
}]
]
}
index.js
require("babel-register")({
// This will override `node_modules` ignoring - you can alternatively pass
// an array of strings to be explicitly matched or a regex / glob
ignore: false
});
require('./server.js')
server.js
import express from 'express'
const app = express()
app.get('/', function(req, res){
res.send('hello world')
})
app.listen(3000)
nodemon index.js
sorry, i have resolve, may be the version no match