sass / sass/embedded-host-node
[Rollup] Cannot read properties of undefined (reading 'url') -- with multiple @use
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 228
- Forks
- 33
- Avg merge
- 5d 16h
- Merged PRs (30d)
- 2
Description
This may be an issue specific to the Rollup plugin, but if sass-embedded is meant to be a drop-in replacement for sass, then it may be an issue worth describing here.
I am using:
"rollup": "^4.39.0",
"rollup-plugin-scss": "^4.0.1",
"sass-embedded": "^1.86.3"
Like this:
import scss from "rollup-plugin-scss";
import * as sassEmbedded from "sass-embedded";
...
scss({
fileName: "output.css",
sass: sassEmbedded
}),
And a stripped down test case file that looks like:
@use 'module1';
@use 'module2';
Which results in Cannot read properties of undefined (reading 'url') but only if there is more than one @use statement.
If I swap out sass-embedded for sass, it works without the error, which leads me to think the error lies in this package.
import scss from "rollup-plugin-scss";
import sass from "sass";
...
scss({
fileName: "output.css",
sass: sass
}),
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported Rollup configuration using rollup-plugin-scss with sass-embedded and an SCSS entry containing two @use statements, then compare it with the same configuration using sass. Trace the resulting undefined url error to determine whether it belongs to sass-embedded or the Rollup plugin; done means the cause is identified and the multiple-@use case no longer fails or is clearly documented as unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rollup, sass, typescript
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100