Created
November 16, 2015 08:53
-
-
Save Phunky/9934e5870859170038a0 to your computer and use it in GitHub Desktop.
Error when trying to use scoped styles with vuejs and node-sass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Vue = require('vue'); | |
var App = require('../../components/app.vue'); | |
new Vue(App).$mount('#app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style lang="sass" scoped> | |
@import './resources/assets/sass/variables/colours'; | |
@import './resources/assets/sass/helpers/colour'; | |
.viewport { | |
display: flex; | |
flex: 1; | |
width: 100vw; | |
height: 100vh; | |
.view { | |
display: flex; | |
flex: 1; | |
height: 10vh; | |
background: colour('x'); | |
} | |
> div { | |
flex: 1; | |
} | |
} | |
</style> | |
<template> | |
<div class="viewport"> | |
<div class="view"> | |
<appbar></appbar> | |
<div class="sidebar"></div> | |
<div class="filter"></div> | |
<div class="content"></div> | |
</div> | |
</div> | |
</template> | |
<script> | |
var appbar = require('./appbar.vue'); | |
export default { | |
name: 'App', | |
components: { | |
appbar | |
} | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style lang="sass" scoped> | |
.appbar { | |
background: #99cc00; | |
height: 5vh; | |
} | |
</style> | |
<template> | |
<div> | |
<div class="appbar really"> | |
This is the new appbar | |
</div> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: 'appbar' | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypeError: Cannot read property 'valueOf' of undefined | |
at tokenize (/home/vagrant/Code/backoffice/node_modules/laravel-elixir/node_modules/vueify/node_modules/postcss-selector-parser/dist/tokenize.js:34:24) | |
at new Parser (/home/vagrant/Code/backoffice/node_modules/laravel-elixir/node_modules/vueify/node_modules/postcss-selector-parser/dist/parser.js:89:49) | |
at Processor.process (/home/vagrant/Code/backoffice/node_modules/laravel-elixir/node_modules/vueify/node_modules/postcss-selector-parser/dist/processor.js:36:25) | |
at /home/vagrant/Code/backoffice/node_modules/laravel-elixir/node_modules/vueify/lib/style-rewriter.js:15:10 | |
at Root.each (/home/vagrant/Code/backoffice/node_modules/laravel-elixir/node_modules/vueify/node_modules/postcss/lib/container.js:58:22) | |
at /home/vagrant/Code/backoffice/node_modules/laravel-elixir/node_modules/vueify/lib/style-rewriter.js:8:10 | |
at LazyResult.run (/home/vagrant/Code/backoffice/node_modules/laravel-elixir/node_modules/vueify/node_modules/postcss/lib/lazy-result.js:201:20) | |
at /home/vagrant/Code/backoffice/node_modules/laravel-elixir/node_modules/vueify/node_modules/postcss/lib/lazy-result.js:115:37 | |
at LazyResult.asyncTick (/home/vagrant/Code/backoffice/node_modules/laravel-elixir/node_modules/vueify/node_modules/postcss/lib/lazy-result.js:129:15) | |
at processing.Promise.then._this2.processed (/home/vagrant/Code/backoffice/node_modules/laravel-elixir/node_modules/vueify/node_modules/postcss/lib/lazy-result.js:155:20) | |
[08:51:09] gulp-notify: [Laravel Elixir] Browserify Failed!: Cannot read property 'valueOf' of undefined while parsing file: /home/vagrant/Code/backoffice/resources/components/appbar.vue | |
{ [TypeError: Cannot read property 'valueOf' of undefined while parsing file: /home/vagrant/Code/backoffice/resources/components/appbar.vue] | |
filename: '/home/vagrant/Code/backoffice/resources/components/appbar.vue', | |
stream: | |
Labeled { | |
_readableState: | |
ReadableState { | |
highWaterMark: 16, | |
buffer: [], | |
length: 0, | |
pipes: [Object], | |
pipesCount: 1, | |
flowing: true, | |
ended: false, | |
endEmitted: false, | |
reading: true, | |
sync: false, | |
needReadable: true, | |
emittedReadable: false, | |
readableListening: false, | |
objectMode: true, | |
defaultEncoding: 'utf8', | |
ranOut: false, | |
awaitDrain: 0, | |
readingMore: false, | |
decoder: null, | |
encoding: null, | |
resumeScheduled: false }, | |
readable: true, | |
domain: null, | |
_events: | |
{ end: [Object], | |
error: [Object], | |
data: [Function: ondata], | |
_mutate: [Object] }, | |
_eventsCount: 4, | |
_maxListeners: undefined, | |
_writableState: | |
WritableState { | |
highWaterMark: 16, | |
objectMode: true, | |
needDrain: false, | |
ending: true, | |
ended: true, | |
finished: true, | |
decodeStrings: true, | |
defaultEncoding: 'utf8', | |
length: 0, | |
writing: false, | |
corked: 0, | |
sync: false, | |
bufferProcessing: false, | |
onwrite: [Function], | |
writecb: null, | |
writelen: 0, | |
buffer: [], | |
pendingcb: 0, | |
prefinished: true, | |
errorEmitted: false }, | |
writable: true, | |
allowHalfOpen: true, | |
_options: { objectMode: true }, | |
_wrapOptions: { objectMode: true }, | |
_streams: [ [Object] ], | |
length: 1, | |
label: 'deps' } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment