Skip to content

formatter: experimentalTailwindcss: stylesheet can't be found #17972

@theoludwig

Description

@theoludwig

.oxfmtrc.json:

{
  "$schema": "./node_modules/oxfmt/configuration_schema.json",
  "ignorePatterns": ["pnpm-lock.yaml", "**/routeTree.gen.ts"],
  "semi": false,
  "experimentalTailwindcss": {
    "stylesheet": "./apps/web/src/styles.css",
    "functions": ["classNames"]
  }
}

Running oxfmt:

$ oxfmt .

  × Failed to format file with external formatter: /home/theoludwig/Documents/Fusey/fusey/apps/web/src/styles.css
  │ JS formatFile promise rejected for file: 'styles.css', parser: 'css': GenericFailure, Error: ENOENT: no such file or directory, open '/home/theoludwig/apps/web/src/styles.css'
Error occurred when checking code style in the above files.

So the first path displayed is the correct one. We can try to cat it: cat /home/theoludwig/Documents/Fusey/fusey/apps/web/src/styles.css, and it works no problem, so the path is correct.

However, as we can see it in the output after, it fails, it is trying to get from ../.. apparently.
/home/theoludwig/apps/web/src/styles.css, which this file doesn't exist.

The reproduction is that we need to set experimentalTailwindcss.stylesheet in .oxfmtrc.json.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions