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

Only with scss: The file cannot because script or style require a preprocessor ... #210

Closed
rondonjon opened this issue May 28, 2020 · 2 comments

Comments

@rondonjon
Copy link
Contributor

Describe the bug

Not sure if this is a problem in svelte-preprocess or in the VS Code plugin, sorry in advance if I posted this in the wrong repo.

I have several .svelte files with Typescript in them which raise no errors, neither in VS Code nor during the CLI build.

Only if I also have a scss style section in them, I get an error.

image

Funny observation: the error message vanishes in VS Code when I change the type to css, but that is obviously no solution for the build.

Additional context

sass is installed via package.json:

"node-sass": "^4.13.1",

The .svelte file:

<script lang="typescript">
  import { Color } from "../../Color";
  ...
</script>

<style lang="scss">
  .color-swatch {
  ...
</style>

...

My svelte.config.js:

const sveltePreprocess = require("svelte-preprocess");

module.exports = {
  preprocess: sveltePreprocess()
};
@kaisermann
Copy link
Member

Hey @rondonjon 👋 This issue seems to be related to the language-tools. Will move this there.

@kaisermann kaisermann transferred this issue from sveltejs/svelte-preprocess Jun 19, 2020
@dummdidumm
Copy link
Member

dummdidumm commented Jun 19, 2020

Did you follow the instructions for SCSS? Especially the last point (setting node path) might be what you need to do. If the error still exists, please continue in #129 (this issue is a duplicate of that issue).

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

3 participants