question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error building component which contains lang="sass" in component style

See original GitHub issue

If my component is configured to use sass the vue build command fails

<style scoped lang="sass">

causes a slew of errors

If I remove the lang="sass" section, it builds successfully, but my component styles are not working correctly

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mikeericksoncommented, Feb 25, 2017

So, if I do as you have said above

<style scoped lang="scss">

The CLI building throws

ERROR in ./HelloWorld.vue
Module not found: Error: Can't resolve 'sass-loader' in '/Users/mikee/Documents/Projects/dev/vue/cd-vue-component-starter/src/js'
 @ ./HelloWorld.vue 3:0-561
 @ multi HelloWorld.vue

But I can assure you, sass-loader is installed

    "sass-lint": "1.10.2",
    "sass-loader": "6.0.2",
    "sasslint-loader": "0.0.1",
    "style-loader": "0.13.1",

image

But since this is not a bug with vue-cli I will refrain from polluting this thread anymore (but I still personally maintain that it is NOT my issue)

I guess we will have to agree to disagree on this one as well

1reaction
mikeericksoncommented, Feb 24, 2017

Hey Linus

I am sure you are already sick of me.

Having said that, is the error occurs when I am using the Vue-cli to build the project (not my own code) this is why I came here.

TL;DR error thrown by “vue build --lib --prod” command (this it is using an internal webpack config)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't compile sass while using Vue Storybook - Stack Overflow
'PRODUCTION' is used when building the static version of storybook. // ATTENTION: Need to preload "global.sass" style for all elements; ...
Read more >
Vue Component with SASS styling not compiling - Laracasts
I have a basic vue component setup based on the Laracast tutortial. However, I'm attempting to use sass in my component file and...
Read more >
@astappiev/rollup-plugin-scss - npm
Rollup multiple .scss, .sass and .css imports. WARNING: This is a fork with some changes required for personal needs. New features includes:.
Read more >
How To Use Vue - Quasar Framework
You'll be building your Quasar app using *.vue files which contain multiple sections: template (HTML), script (Javascript) and style (CSS/SASS/ ...
Read more >
Compile errors - sass-loader in vue.config.js with Vue CLI 3
yarn add -D sass-loader node-sass; error: ERROR Failed to compile with 1 errors 15:21:48 error in ./src/components/HelloWorld.sass?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found