Skip to content

[sass] Error since v7.0.1 #20346

Closed
Closed

Description

@msev

Describe the bug

Hi,

Since version 7.0.1, I've had an error when compiling sass in a particular case.
In a project, I have a folder named like a file at the same level:

dev/
  styles/
    components/
      section.scss
      section/

When i run the vite build command, i have the following error:

[sass] Error: Error: EISDIR: illegal operation on a directory, read
   ╷
36 │ @use 'components/section';

The solution that works is to add the .scss extension to @use, but this always worked before version 7.0.1.
If I rollback to version 7.0.0, I no longer have the problem and compilation works perfectly.

Reproduction

XXX

Steps to reproduce

No response

System Info

System:
    OS: macOS 15.3.2
    CPU: (8) arm64 Apple M1
    Memory: 130.52 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.15.1 - /usr/local/bin/node
    Yarn: 1.22.22 - ~/.yarn/bin/yarn
    npm: 8.19.2 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 137.0.7151.120
    Safari: 18.3.1
    Safari Technology Preview: 26.0

Used Package Manager

npm

Logs

No response

Validations

Activity

  1. added theissue type on Jul 3, 2025
  2. mlankamp commented on Jul 3, 2025

    @mlankamp

    I have the same problem with version 7.0.1 and vuetify:

    [vite:css] [sass] EISDIR: illegal operation on a directory, read
      ╷
    3 │ @forward './settings'
      │ ^^^^^^^^^^^^^^^^^^^^^
    
  3. bricss commented on Jul 3, 2025

    @bricss

    Same issue since v7.0.1:

    [vite] Internal server error: [sass] Can't find stylesheet to import.
      ╷
    2 │ @use 'fonts';
      │ ^^^^^^^^^^^^
  4. cathrinevaage commented on Jul 3, 2025

    @cathrinevaage

    While the original issue points out an issue with conflicting directory and file names, this also presents as an issue when targeting an index file by importing the surrounding directory.
    E.g. where components/index.scss is a barrel file:

    sass/
      components/
        index.scss
        foo.scss
        bar.scss
      app.scss
    
    // app.scss
    @import './components';
    [vite] Internal server error: [sass] EISDIR: illegal operation on a directory, read
       ╷
    11 │ @import "./components";
       │         ^^^^^^^^^^^^^^
       ╵
    
  5. mrginglymus commented on Jul 3, 2025

    @mrginglymus
    Contributor
  6. ffxsam commented on Jul 3, 2025

    @ffxsam

    Vite 7 breaks Vuetify 3 for me. Hundreds of errors about @use. Same EISDIR error as others have mentioned.

  7. added
    p4-important
    regression
    and removed on Jul 4, 2025
  8. self-assigned this
    on Jul 4, 2025
  9. locked and limited conversation to collaborators on Jul 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feat: cssp4-importantregression

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions