(node:82942) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred.
No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred.
No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred.
No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred.
[Vue warn]: Error in beforeCreate hook: "Error: Module build failed: Error: Couldn't find preset "@babel/preset-env" relative to directory "/Users/xxx/node_modules/css-loader"
对比已有项目发现是css-loader版本有问题,安装了"css-loader": “0.28.0”,版本解决好了。
贴上我的package.json文件
{
"name": "xxx",
"version": "1.0.0",
"description": "# node server.js",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "nodemon server.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"babel-core": "^6.10.4",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.9.0",
"cookie-parser": "~1.4.3",
"css-loader": "0.28.0",
"debug": "~2.6.9",
"ejs": "~2.5.7",
"express": "~4.16.0",
"html-webpack-plugin": "^2.30.1",
"http-errors": "~1.6.2",
"morgan": "~1.9.0",
"vip-server-renderer": "^2.0.6",
"vue": "^2.5.13",
"vue-router": "^3.0.2",
"vue-server-renderer": "^2.6.8",
"vue-template-compiler": "^2.5.13",
"webpack": "3.6.0",
"webpack-merge": "^4.1.1",
"webpack-node-externals": "^1.7.2"
},
"devDependencies": {
"babel-preset-stage-2": "^6.24.1",
"less": "^3.9.0",
"less-loader": "^4.1.0",
"style-loader": "^0.23.1",
"vue-loader": "13.3.0",
"vue-style-loader": "3.0.1",
"webpack-dev-middleware": "^3.6.2",
"webpack-hot-middleware": "^2.24.3"
}
}