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

windows10 npm run build [email protected] Module build failed: CssSyntaxError: #1280

Closed
crli opened this issue May 2, 2018 · 10 comments
Closed

Comments

@crli
Copy link

crli commented May 2, 2018

Version

15.0.0

Reproduction link

https://codesandbox.io/s/9ymm8mw9jo/

Steps to reproduce

npm i

npm run build

What is expected?

webpack build good

What is actually happening?

ERROR in ./src/App.vue?vue&type=style&index=0&lang=css (./node_modules/_vue-loader@15.0.5@vue-loader/lib/loaders/stylePostLoader.js!./node_modules/_vue-style-loader@4.1.0@vue-style-loader!./node_modules/_css-loader@0.28.11@css-loader!./node_modules/_vue-loader@15.0.5@vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=style&index=0&lang=css)
Module build failed: CssSyntaxError: E:\gitwork\qqqqqqq\src\App.vue:5:1: Unknown word

@Wbiokr
Copy link

Wbiokr commented May 2, 2018

+1 CssSyntaxError .

But, it can build with [email protected]

@kuoruan
Copy link

kuoruan commented May 2, 2018

+1

error  in ./src/components/swipe/Swipe.vue?vue&type=style&index=0&module=true&lang=css

Syntax Error: Unknown word

@crli crli changed the title npm run build [email protected] Module build failed: CssSyntaxError: windows10 npm run build [email protected] Module build failed: CssSyntaxError: May 2, 2018
@yyx990803
Copy link
Member

Cannot reproduce. Your repro works fine for me (after renaming src/main.js to src/index.js). All tests are passing on Windows as well, so closing unless a valid repro can be provided.

@crli
Copy link
Author

crli commented May 3, 2018

https://codesandbox.io/s/9ymm8mw9jo/ is fine but when npm run build is not fine, it can build with [email protected] @yyx990803

@Wbiokr
Copy link

Wbiokr commented May 3, 2018

@crli 老铁,你的CssSyntaxError爆红处理好了吗

@crli
Copy link
Author

crli commented May 3, 2018

@Wbiokr 暂时用14.0.0了

@yyx990803
Copy link
Member

@crli I downloaded it and ran on a Windows 10 machine, and it also works fine. Make sure to provide actual reproduction.

@crli
Copy link
Author

crli commented May 3, 2018

https://github.com/crli/vueloader1505 node v8.11.1 npm 5.6.0 @yyx990803

@sen-miao
Copy link

@yyx990803 @crli There may be many test: /\.css$/ or test: /.less$/

@devkea
Copy link

devkea commented May 13, 2021

I use .scss files and some styles in the component like <style scoped module lang="scss">,
so, I replaced test: /\.(s*)css$/, to /\.(sass|css)/ and it works for me!

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

6 participants