Vue-element-admin: 执行npm run build:prod的时候报错 TypeError: Cannot read property 'search' of undefined

Created on 18 Oct 2018  ·  7Comments  ·  Source: PanJiaChen/vue-element-admin

(node:24564) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'search' of undefined
at D:\cloudadmin\vue-element-admin\static\css\chunk-74c1.82bf9b33.css:1:371546
at isValueCustomProp (D:\cloudadmin\vue-element-admin\node_modules\postcss-merge-longhand\dist\lib\decl\borders.js:106:45)
at D:\cloudadmin\vue-element-admin\node_modules\postcss-merge-longhand\dist\lib\decl\borders.js:449:18
at mergeRules (D:\cloudadmin\vue-element-admin\node_modules\postcss-merge-longhand\dist\lib\mergeRules.js:46:17)
at wsc.forEach (D:\cloudadmin\vue-element-admin\node_modules\postcss-merge-longhand\dist\lib\decl\borders.js:438:34)
at Array.forEach ()
at Object.merge (D:\cloudadmin\vue-element-admin\node_modules\postcss-merge-longhand\dist\lib\decl\borders.js:436:9)
at _decl2.default.forEach.p (D:\cloudadmin\vue-element-admin\node_modules\postcss-merge-longhand\dist\index.js:22:19)
at Array.forEach ()
at css.walkRules.rule (D:\cloudadmin\vue-element-admin\node_modules\postcss-merge-longhand\dist\index.js:20:28)
at D:\cloudadmin\vue-element-admin\node_modules\cssnano\node_modules\postcss\lib\container.js:239:18
at D:\cloudadmin\vue-element-admin\node_modules\cssnano\node_modules\postcss\lib\container.js:135:18
at Root.each (D:\cloudadmin\vue-element-admin\node_modules\cssnano\node_modules\postcss\lib\container.js:101:16)
at Root.walk (D:\cloudadmin\vue-element-admin\node_modules\cssnano\node_modules\postcss\lib\container.js:131:17)
at Root.walkRules (D:\cloudadmin\vue-element-admin\node_modules\cssnano\node_modules\postcss\lib\container.js:237:19)
at css (D:\cloudadmin\vue-element-admin\node_modules\postcss-merge-longhand\dist\index.js:19:13)
at initializePlugin (D:\cloudadmin\vue-element-admin\node_modules\cssnano\dist\index.js:35:51)
(node:24564) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:24564) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Most helpful comment

主要是依赖的 cssnano 升级出现了点问题。

暂时解决方案

https://github.com/PanJiaChen/vue-element-admin/blob/df23405bdee225c37efde3bcb634db8b368919d6/build/webpack.prod.conf.js#L143

注释该行代码。

All 7 comments

主要是依赖的 cssnano 升级出现了点问题。

暂时解决方案

https://github.com/PanJiaChen/vue-element-admin/blob/df23405bdee225c37efde3bcb634db8b368919d6/build/webpack.prod.conf.js#L143

注释该行代码。

谢谢大佬!

谢谢 !你是摇滚明星

@PanJiaChen https://github.com/cssnano/cssnano/releases 作者已经发布新版本了cssnano了 麻烦能更新下不?

各位,我的已经正常了,确实要删除node_modules,但是我的还不仅仅这样,我还发现我本地的git不能用了,git命令报一堆看不懂的错,发现要更新xcode才行,于是我花了一晚上时间更新xcode(5GB多啊,好慢),于是git也正常了,又可以愉快打包了。

Was this page helpful?
0 / 5 - 0 ratings