vue-admin-template 基础模板 npm run build 报错 有知道是为什么吗

我直接clone的github上的,没有改任何东西,安装都正常 在打包时出现了问题



> node build/build.js


(node:1304) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'search' of undefined

    at C:\Project-key\liuzhaoping\vue-admin-template\static\css\chunk-elementUI.e8091cad.css:1:155209

    at isValueCustomProp (C:\Project-key\liuzhaoping\vue-admin-template\node_modules\postcss-merge-longhand\dist\lib\decl\borders.js:106:45)

    at C:\Project-key\liuzhaoping\vue-admin-template\node_modules\postcss-merge-longhand\dist\lib\decl\borders.js:449:18

    at mergeRules (C:\Project-key\liuzhaoping\vue-admin-template\node_modules\postcss-merge-longhand\dist\lib\mergeRules.js:46:17)

    at wsc.forEach (C:\Project-key\liuzhaoping\vue-admin-template\node_modules\postcss-merge-longhand\dist\lib\decl\borders.js:438:34)

    at Array.forEach (<anonymous>)

    at Object.merge (C:\Project-key\liuzhaoping\vue-admin-template\node_modules\postcss-merge-longhand\dist\lib\decl\borders.js:436:9)

    at _decl2.default.forEach.p (C:\Project-key\liuzhaoping\vue-admin-template\node_modules\postcss-merge-longhand\dist\index.js:22:19)

    at Array.forEach (<anonymous>)

    at css.walkRules.rule (C:\Project-key\liuzhaoping\vue-admin-template\node_modules\postcss-merge-longhand\dist\index.js:20:28)

    at C:\Project-key\liuzhaoping\vue-admin-template\node_modules\cssnano\node_modules\postcss\lib\container.js:239:18

    at C:\Project-key\liuzhaoping\vue-admin-template\node_modules\cssnano\node_modules\postcss\lib\container.js:135:18

    at Root.each (C:\Project-key\liuzhaoping\vue-admin-template\node_modules\cssnano\node_modules\postcss\lib\container.js:101:16)

    at Root.walk (C:\Project-key\liuzhaoping\vue-admin-template\node_modules\cssnano\node_modules\postcss\lib\container.js:131:17)

    at Root.walkRules (C:\Project-key\liuzhaoping\vue-admin-template\node_modules\cssnano\node_modules\postcss\lib\container.js:237:19)

    at css (C:\Project-key\liuzhaoping\vue-admin-template\node_modules\postcss-merge-longhand\dist\index.js:19:13)

    at initializePlugin (C:\Project-key\liuzhaoping\vue-admin-template\node_modules\cssnano\dist\index.js:35:51)

(node:1304) 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: 2)

(node:1304) [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.


喵喵姐
浏览 8674回答 3
3回答

qq_kaiking_g_0

把node_modules这个文件删掉,然后重新运行 cnpm i,一般都行!

蓓岑2015

请问楼主解决了吗?我也突然遇到这个问题,哎,无从下手。
打开App,查看更多内容
随时随地看视频慕课网APP