Skip to content

Bad character escape sequence, expected 2 hex characters in Layout.less #13189

@iliya03

Description

@iliya03

What happens?

When I build the project with umi 4.5.3 and antd 6 on linux, it runs fine, but on windows, I get the following issue:

Building with mako for development...
● Mako ▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨ (24%) parse parse                                                                                                          Build failed.
  × Bad character escape sequence, expected 2 hex characters
    ╭─[src/.umi/plugin-layout/Layout.less:38:1]
 35 │ undefined
 36 │
 37 │
 38 │       Error in \Users\iliya\Projects\xenlogix-new\fe\src\.umi\plugin-layout\Layout.less (line 1, column 0).`)
    ·                                     ───
    ╰────

fatal - [Error: Build with mako failed.]
fatal - A complete log of this run can be found in:
fatal - C:\Users\iliya\Projects\xenlogix-new\fe\node_modules\.cache\logger\umi.log
fatal - Consider reporting a GitHub issue on https://github.com/umijs/umi/issues

How To Reproduce

Steps to reproduce the behavior:

  1. upgrade from antd 5 to 6
  2. Set antd: { import: false, style: 'css' } in config.ts
  3. Run pnpm i and pnpm dev

Expected behavior

  1. Program runs successfully

Context

  • Umi Version: 4.5.3
  • Node Version: 22.14.0
  • Platform: Windows x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions