错误:No parser and no filepath given, using 'babel' the parser now but this will throw an error in t he f
原因:vue-loader的版本没跟上其他包的版本导致解析器不运行
解决办法:
- 找到modules包里面的:node_modulesvue-loaderlib emplate-compilerindex.js
- 找到
if (!isProduction) { code = prettier.format(code, { semi: false}) }
- 替换为
if (!isProduction) { code = prettier.format(code, { semi: false, parser: 'babel' }) }
重新run ,ok