Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue -elementUI 运行报错error in ./node_modules/element-ui/lib/theme-chalk/index.css_Marblog的博客-CSDN博客 #81

Open
HenryTSZ opened this issue Sep 20, 2023 · 0 comments

Comments

@HenryTSZ
Copy link
Owner

最新推荐文章于 2023-07-24 15:22:28 发布

vue -elementUI 运行报错error in ./node_modules/element-ui/lib/theme-chalk/index.css_Marblog的博客-CSDN博客

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

项目用到了vue,elementUI,结合Webpack打包运行的时候报错

web-im@1.0.0 dev F:\demo\web-imweb-im@1.0.0 dev F:\demo\web-im

webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

13% building modules 32/75 modules 43 active
13% 建筑模块 32/75 模块 43 活动
…te&index=0!F:\demo\web-im\src\App.vue{ parser: “babylon” } is
...TE&指数=0!F:\demo\web-im\src\App.vue{ parser: “babylon” } is
deprecated; we now treat it as { pa rser: “babel” }. 94% asset
荒废的;我们现在将其视为 { pa rser: “babel” }。94% 资产
optimization优化

ERROR Failed to compile with 1 errors
错误 编译失败,出现 1 个错误
10:32:34

error in ./node_modules/element-ui/lib/theme-chalk/index.css
./node_modules/element-ui/lib/theme-chalk/index中的错误.css

Module build failed: ParseError:
模块构建失败:解析错误:
F:\demo\web-im\node_modules\element-ui\lib\theme-chalk\index.css:1:63
F:\demo\web-im\node_modules\element-ui\lib\theme-chalk\index.css:1:63
1| var escape = require("…/…/…/css-loader/lib/url/escape.js");
1|var escape = require(“.../.../.../css-loader/lib/url/escape.js”);
--------------------------------------------------------------------^ 2| exports = module.exports =
--------------------------------------------------------------------^ 2|导出 = 模块。导出 =
require("…/…/…/css-loader/lib/css-base.js")(true); 3| // imports
require(“.../.../.../css-loader/lib/css-base.js”)(true);3|进口
4|

expected “indent”, got “;”预期的“缩进”,得到“;”

这里应该是导饿了么css出了问题,解决办法

找到webpack.dev.conf.js文件,
其中有一行

module: {
    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
  },

usePostCSS把后面的true改成false就可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant