请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

请教老师一个问题,npm run build之后出现Error: Unexpected "space" found.的解决方案是什么呢?

ERROR in ./~/extract-text-webpack-plugin/loader.js?{"omit":1,"extract":true,"remove":true}!./~/vue-style-loader!./~/css-loader?sourceMap!./~/vue-loader/lib/style-rewriter.js!./~/stylus-loader?sourceMap!./~/vue-loader/lib/selector.js?type=style&index=0!./src/components/header/header.vue

Module build failed: ModuleBuildError: Module build failed: Error: Unexpected "space" found.

    at new error (E:\vueDemo\sell\node_modules\postcss-selector-parser\dist\processor.js:29:23)

    at Parser.error (E:\vueDemo\sell\node_modules\postcss-selector-parser\dist\parser.js:234:15)

    at Parser.pseudo (E:\vueDemo\sell\node_modules\postcss-selector-parser\dist\parser.js:364:18)

    at Parser.parse (E:\vueDemo\sell\node_modules\postcss-selector-parser\dist\parser.js:553:22)

    at Parser.loop (E:\vueDemo\sell\node_modules\postcss-selector-parser\dist\parser.js:521:18)

    at new Parser (E:\vueDemo\sell\node_modules\postcss-selector-parser\dist\parser.js:104:21)

    at Processor.process (E:\vueDemo\sell\node_modules\postcss-selector-parser\dist\processor.js:26:21)

    at getParsed (E:\vueDemo\sell\node_modules\postcss-minify-selectors\dist\index.js:32:59)

    at optimise (E:\vueDemo\sell\node_modules\postcss-minify-selectors\dist\index.js:107:21)

    at E:\vueDemo\sell\node_modules\postcss\lib\container.js:241:28

    at E:\vueDemo\sell\node_modules\postcss\lib\container.js:148:26

    at Root.each (E:\vueDemo\sell\node_modules\postcss\lib\container.js:114:22)

    at Root.walk (E:\vueDemo\sell\node_modules\postcss\lib\container.js:147:21)

    at Root.walkRules (E:\vueDemo\sell\node_modules\postcss\lib\container.js:239:25)

    at E:\vueDemo\sell\node_modules\postcss-minify-selectors\dist\index.js:133:20

    at LazyResult.run (E:\vueDemo\sell\node_modules\postcss\lib\lazy-result.js:276:20)

    at DependenciesBlock.onModuleBuildFailed (E:\vueDemo\sell\node_modules\webpack-core\lib\NormalModuleMixin.js:315:19)

    at nextLoader (E:\vueDemo\sell\node_modules\webpack-core\lib\NormalModuleMixin.js:270:31)

    at E:\vueDemo\sell\node_modules\webpack-core\lib\NormalModuleMixin.js:292:15

    at context.callback (E:\vueDemo\sell\node_modules\webpack-core\lib\NormalModuleMixin.js:148:14)

    at Object.<anonymous> (E:\vueDemo\sell\node_modules\css-loader\lib\loader.js:32:18)

    at E:\vueDemo\sell\node_modules\css-loader\lib\processCss.js:211:3

    at process._tickCallback (internal/process/next_tick.js:103:7)


正在回答

2回答

NeurotoxinVX 2016-11-30 20:03:35

根据错误提示应该是在解析 vue 组件中的 stylus 时发现了非法的空格,请检查一下自己的 stylus 代码

1 回复 有任何疑惑可以回复我~
  • 提问者 zjuxufan #1
    好的多谢,我再仔细检查一下。不过npm run dev的时候倒是没有问题。
    回复 有任何疑惑可以回复我~ 2016-11-30 20:23:50
  • 提问者 zjuxufan #2
    确实是多了个空格,现在编译通过了,多谢回复!
    回复 有任何疑惑可以回复我~ 2016-11-30 21:11:23
  • 提问者 zjuxufan #3
    非常感谢!
    回复 有任何疑惑可以回复我~ 2016-11-30 21:49:41
TiAmo_oooooo 2017-02-09 13:12:18

你好,我想请问你一下你的是怎么解决的?谢谢

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信