Skip to content

dart-sass error since bootstrap 5.3.3 #39978

Closed as not planned
Closed as not planned
@arnriu

Description

@arnriu

Prerequisites

Describe the issue

Since bootstrap 5.3.3, dart-sass 1.77.1 is not compiling.
If I go back to bootstrap 5.3.2, everything is fine. If I switch to original sass 1.77.1, everything is fine.

Error in console:

node:internal/url:804
    this.#updateContext(bindingUrl.parse(input, base));

TypeError: Invalid URL
    at new URL (node:internal/url:804:36)
    at removeLegacyImporterFromSpan (/project_path/node_modules/.pnpm/sass-embedded@1.74.1/node_modules/sass-embedded/dist/lib/src/legacy/utils.js:35:28)
    at newLegacyException (/project_path/node_modules/.pnpm/sass-embedded@1.74.1/node_modules/sass-embedded/dist/lib/src/legacy/index.js:253:72)
    at /project_path/node_modules/.pnpm/sass-embedded@1.74.1/node_modules/sass-embedded/dist/lib/src/legacy/index.js:24:116
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_INVALID_URL',
  input: '/project_path/node_modules/.pnpm/bootstrap@5.3.3_@popperjs+core@2.11.8/node_modules/bootstrap/scss/_variables.scss'
}

Reduced test cases

You can try this devbox with bootstrap 5.3.3. npm start fails
Now in package.json , change bootstrap to 5.3.2, then npm i && npm start. It works.

I only imported 2 files in index.sass, for minimum case. First is functions.scss which seems to be ok in both versions, second is variables.scss, which fails in 5.3.3.

https://codesandbox.io/p/devbox/competent-mahavira-4vgdjg?embed=1&file=%2Fpackage.json

What operating system(s) are you seeing the problem on?

macOS

What browser(s) are you seeing the problem on?

No response

What version of Bootstrap are you using?

5.3.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions