Doray
Doray
  • 发布:2019-05-18 00:28
  • 更新:2019-05-20 10:12
  • 阅读:1494

发布为h5时候 报错

分类:uni-app

Module build failed (from ./node_modules/vue-loader/lib/loaders/stylePostLoader.js):
[HBuilder] 00:22:26.988 TypeError: Cannot read property 'spaces' of undefined

2019-05-18 00:28 负责人:无 分享
已邀请:
2***@qq.com

2***@qq.com

> [HBuilder] 00:30:55.226 Module build failed (from ./node_modules/vue-loader/lib/loaders/stylePostLoader.js):
[HBuilder] 00:30:55.228 TypeError: Cannot read property 'spaces' of undefined
[HBuilder] 00:30:55.244 at selectors.each (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@vue/component-compiler-utils/dist/stylePlugins/scoped.js:46:36)
[HBuilder] 00:30:55.245 at Root.each (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/selectors/container.js:207:22)
[HBuilder] 00:30:55.260 at Processor.node.selector.selectorParser [as func] (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@vue/component-compiler-utils/dist/stylePlugins/scoped.js:24:23)
[HBuilder] 00:30:55.262 at Processor._runSync (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/processor.js:84:30)
[HBuilder] 00:30:55.280 at Processor.processSync (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@vue/component-compiler-utils/node_modules/postcss-selector-parser/dist/processor.js:177:27)
[HBuilder] 00:30:55.281 at rewriteSelector (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@vue/component-compiler-utils/dist/stylePlugins/scoped.js:52:12)
[HBuilder] 00:30:55.295 at Root.each (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@vue/component-compiler-utils/node_modules/postcss/lib/container.js:101:16)
[HBuilder] 00:30:55.297 at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@vue/component-compiler-utils/dist/stylePlugins/scoped.js:9:10
[HBuilder] 00:30:55.313 at LazyResult.run (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@vue/component-compiler-utils/node_modules/postcss/lib/lazy-result.js:295:14)
[HBuilder] 00:30:55.314 at LazyResult.sync (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@vue/component-compiler-utils/node_modules/postcss/lib/lazy-result.js:281:26)
[HBuilder] 00:30:55.328 at LazyResult.stringify (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@vue/component-compiler-utils/node_modules/postcss/lib/lazy-result.js:305:10)
[HBuilder] 00:30:55.329 at LazyResult.get (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@vue/component-compiler-utils/node_modules/postcss/lib/lazy-result.js:350:19)
[HBuilder] 00:30:55.346 at doCompileStyle (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@vue/component-compiler-utils/dist/compileStyle.js:60:23)
[HBuilder] 00:30:55.347 at compileStyle (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@vue/component-compiler-utils/dist/compileStyle.js:8:12)
[HBuilder] 00:30:55.362 at Object.module.exports (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/vue-loader/lib/loaders/stylePostLoader.js:9:33)
[HBuilder] 00:30:55.363 ERROR Build failed with errors.

Doray

Doray (作者) - 向生活发起冲锋

问提已解决,自己不细心,在写css时候选择器后面多写了一个逗号,类似于:.color .red ,{ color : red} 在运行时不报错,打包发布时就报上述错。

  • lipangzi

    但是没报错

    2019-08-16 17:23

该问题目前已经被锁定, 无法添加新回复