ES6 is not available in express.

  node.js, question

ES6 is not available in express.
Es6 is parsed in static files, and in webpack->module->loaders (via babel- loader)

test: /\.(js|jsx)$/,
 loader: "babel",
 exclude:/node_modules/,

However, the error cannot be recognized in the server’s folder: ReferenceError: Promise Is Not Defined

new promise(()=>{
 mongodb.open()
 }).then(function (db) {
 return db.collection('posts');
 }).then(function (collection) {
 let query = {};
 if (name){
 query.name = name
 bracket
 return collection.find(query).sort({time:-1})
 .toArray()
 }).then((docs)=>{
 return callback(null,docs)
 }).catch(function (err) {
 mongodb.close();
 return callback(err)
 });

The following documents are my dependencies:

"dependencies": {
 "babel-loader": "~5.3.2",
 "babel-preset-es2015": "^6.14.0",
 "babel-preset-react": "^6.11.1",
 "babel-preset-stage-0": "latest",
 "body-parser": "~1.15.1",
 "bundle-loader": "^0.5.4",
 "jquery" : "latest",
 "co-body": "latest",
 "co-views": "~0.2.0",
 "cookie-parser": "~1.4.3",
 "cross-env": "latest",
 "css-loader": "~0.23.0",
 "debug": "~2.2.0",
 "ejs": "~2.4.1",
 "express": "~4.13.4",
 "file-loader": "~0.8.5",
 "json-loader": "^0.5.4",
 "jsx-loader": "~0.13.2",
 "morgan": "~1.7.0",
 "node-sass": "^3.4.2",
 "ramda": "latest",
 "raw-loader": "~0.5.1",
 "react": "~0.14.2",
 "react-dom": "~0.14.2",
 "react-router": "latest",
 "reload": "latest",
 "sass-loader": "~3.0.0",
 "serve-favicon": "~2.3.0",
 "style-loader": "~0.13.0",
 "supervisor": "latest",
 "url-loader": "~0.5.6",
 "webpack": "~1.12.6",
 "webpack-dev-server": "~1.12.1",
 "webpack-require-http": "latest",
 "mongodb": "latest",
 "express-session": "latest",
 "connect-mongo": "latest",
 "connect-flash": "0.1.1"
 },
 "devDependencies": {
 "babel-cli": "^6.14.0",
 "babel-core": "^6.14.0",
 "babel-preset-react-hmre": "^1.1.1",
 "babel-preset-stage-2": "^6.13.0"
 bracket

Babellrc file has been added to the root directory. it is useless and still reports an error.

bracket
 "presets": ["es2015"]
 bracket

Ask the great god for advice.

Try capitalizing promise? Node environment should directly support Promise object