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

Incompatibility with latest node-sass and sass package versions #1005

Closed
silverbackdan opened this issue Dec 20, 2021 · 7 comments
Closed

Incompatibility with latest node-sass and sass package versions #1005

silverbackdan opened this issue Dec 20, 2021 · 7 comments

Comments

@silverbackdan
Copy link

Bug report

When building with Vercel (and not locally) there is an issue with the types declaration causing an error

Actual Behavior

This is what shows in the output logs

FATAL  Nuxt build error
--
17:49:44.987 |  
17:49:44.987 | ERROR in node_modules/@types/sass-loader/interfaces.d.ts
17:49:44.987 | ERROR in node_modules/@types/sass-loader/interfaces.d.ts(410,43):
17:49:44.987 | 410:43 Generic type 'Options<sync>' requires 1 type argument(s).
17:49:44.987 | 408 \|     type Callback<T> = (loaderContext: Webpack.loader.LoaderContext) => T;
17:49:44.988 | 409 \|
17:49:44.988 | > 410 \|     type SassOptions = NodeSass.Options \| Sass.Options;
17:49:44.988 | \|                                           ^
17:49:44.988 | 411 \| }
17:49:44.988 | 412 \|

Expected Behavior

The build should work

How Do We Reproduce?

I would love to give a concise reproduction. However when building locally I could not replicate this. All I can see is in the Vercel builder, which is also using Node 14.x, when I use sass v1.45 which was released 10 days ago (and I tried with the latest node-sass instead as well) I get this error. If I use sass v1.44 it does not happen.

Please paste the results of npx webpack-cli info here, and mention other relevant information

I'm afraid I can't because this is a closed system in Vercel carrying out the build and it does not happen locally.. I know this makes it difficult and perhaps very hard to trace the issue. I'm sorry for this and understand if it means you are not able to look into it further.

In case the issue is with the builder package running I've also opened an issue on that repo here: nuxt/vercel-builder#645

I'm afraid this is not my area of expertise but whatever I can do to try and help, please reach out.

Thanks.

@alexander-akait
Copy link
Member

But it is typescript problem, we don't have types for sass here and can't fix it, sorry

@alexander-akait
Copy link
Member

Maybe sass command change own types and before it was not generic, now it is generic, I think better to open an issue in sass (dart-sass) repo

@silverbackdan
Copy link
Author

OK thank you, I'll try there.

@silverbackdan
Copy link
Author

Although.. I see the types are in a dir node_modules/@types/sass-loader - is there any clues why there would be types in an sass-loader dir?

@silverbackdan silverbackdan reopened this Dec 21, 2021
@alexander-akait
Copy link
Member

alexander-akait commented Dec 21, 2021

We don't have types here yet, if you have problems with types from node_modules/@types/sass-loader, please open an issue in https://github.com/DefinitelyTyped/DefinitelyTyped

@alexander-akait
Copy link
Member

@silverbackdan
Copy link
Author

Brill, thanks very much!

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