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

SCSS on Vue components cannot be found at build #25

Open
cdvillard opened this issue Jul 2, 2019 · 1 comment
Open

SCSS on Vue components cannot be found at build #25

cdvillard opened this issue Jul 2, 2019 · 1 comment

Comments

@cdvillard
Copy link

cdvillard commented Jul 2, 2019

System: Mac OS High Sierra
Gridsome version: gridsome v0.6.5, @gridsome/cli v0.2.1

After I run gridsome create <dir> https://github.com/gridsome/gridsome-starter-blog.git, I'll cd into the folder and run gridsome develop to be hit with a compile error:

 ERROR  Failed to compile with 9 errors                                                                                                                                 9:18:42 AM

This dependency was not found:

* ~/assets/style/index.scss in ./src/main.js

To install it, you can run: npm install --save ~/assets/style/index.scss


These relative modules were not found:

* ./Post.vue?vue&type=style&index=0&lang=scss& in ./src/templates/Post.vue
* ./Default.vue?vue&type=style&index=0&lang=scss& in ./src/layouts/Default.vue
* ./Author.vue?vue&type=style&index=0&lang=scss& in ./src/components/Author.vue
* ./PostCard.vue?vue&type=style&index=0&lang=scss& in ./src/components/PostCard.vue
* ./PostMeta.vue?vue&type=style&index=0&lang=scss& in ./src/components/PostMeta.vue
* ./PostTags.vue?vue&type=style&index=0&lang=scss& in ./src/components/PostTags.vue
* ./Logo.vue?vue&type=style&index=0&lang=scss& in ./src/components/Logo.vue
* ./ToggleTheme.vue?vue&type=style&index=0&lang=scss& in ./src/components/ToggleTheme.vue

I've encountered the same issue trying to run build on a freshly created project using another project forked from this, though with less issues.

 ERROR  Failed to compile with 5 errors                                                                                                                                 9:13:04 AM

These relative modules were not found:

* ./Post.vue?vue&type=style&index=0&lang=scss& in ./src/templates/Post.vue
* ./PostMeta.vue?vue&type=style&index=0&lang=scss& in ./src/components/PostMeta.vue
* ./PostTags.vue?vue&type=style&index=0&lang=scss& in ./src/components/PostTags.vue
* ./Author.vue?vue&type=style&index=0&lang=scss& in ./src/components/Author.vue
* ./PostCard.vue?vue&type=style&index=0&lang=scss& in ./src/components/PostCard.vue

I don't think the routing is incorrect, but I'm unsure as to why this is occuring.

EDIT: A bit more investigation is showing that it's related to the SCSS tied to each element. Of course, if I remove it, GraphQL throws a fit, but at least I can narrow it down to that.

@cdvillard cdvillard changed the title Vue components cannot be found at build SCSS on Vue components cannot be found at build Jul 2, 2019
@coffeepostal
Copy link

I was having a similar issue, rebuilding node-sass seemed to help: npm rebuild node-sass

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

2 participants