umijs / mako

An extremely fast, production-grade web bundler based on Rust.
https://makojs.dev
MIT License
1.74k stars 65 forks source link

[Bug] umi 项目(antd desgin) 在windows下运行不起来--Build with mako failed #1583

Closed nathanlao closed 5 days ago

nathanlao commented 6 days ago

UPDATES: project build succesfully on macOS but problem exists in Windows

Steps to reproduce

git clone git@github.com:ant-design/ant-design.git npm install npm start

What is Expected?

The application should run locally without errors.

What is Actually Happening?

During the build process, the following error occurs:

  × Bad character escape sequence, expected 4 hex characters
   ╭─[components\upload\demo\debug-disabled.tsx?dumi-raw:3:1]
 3 │   × Bad character escape sequence, expected 4 hex characters
 4 │    ╭─[components\upload\demo\debug-disabled.tsx?dumi-raw:1:1]
 5 │  1 │
 6 │  2 │   import 'D:/ant-design\components\upload\demo\debug-disabled.tsx?watch=parent';
   ·                                                  ──
 7 │    ·                                   ──
 8 │  3 │   export default "import React from 'react';\nimport { InboxOutlined, PlusOutlined, UploadOutlined } from '@ant-design/icons';\nimport { Button, Space, Upload } from 'antd';\nimport type { UploadFile } from 'antd';\n\nconst { Dragger } = Upload;\n\nconst fileList: UploadFile[] = [\n  {\n    uid: '-1',\n    name: 'image.png',\n    status: 'done',\n    url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',\n  },\n  {PnJuuZ.png',\n  },\n  {\n    uid: '-5',\n    name: 'image.png',\n    status: 'error',\n  },\n];\n\nconst App: React.FC = () => {\n  const uploadButton = (\n    <button style={{ border: 0, background: 'none' }} type=\"button\">\n      <PlusOutlined />\n      <div style={{ marginTop: 8 }}>Upload</div>\n    </button>\n  );\n\n  return (\n    <Space direction=\"vertical\">\n      <Upload disabled>Click Text to Upload</Upload>\n      <Upload disabled>\n        <Button icon={<UploadOutlined />}>Click to Upload</Button>\n      </Upload>\n      <Upload name=\"avatar\" listType=\"picture-card\" fileList={fileList} disabled>\n        {uploadButton}\n      </Upload>\n      <Upload name=\"avatar\" listType=\"picture-circle\" fileList={fileList} disabled>\n        {uploadButton}\n      </Upload>\n      <Dragger disabled>\n        <p className=\"ant-upload-drag-icon\">\n          <InboxOutlined />\n        </p>\n        <p className=\"ant-upload-text\">Click or drag file to this arPnJuuZ.png',\n  },\n  {\n    uid: '-5',\n    name: 'image.png',\n    status: 'error',\n  },\n];\n\nconst App: React.FC = () => {r drag file to this area to upload</p>\n        <p className=\"ant-upload-hint\">\n          Support for a single or bulk upload. Strictly prohibited from uploading company data or\n          other banned files.\n        </p>\n      </Dragger>\n    </Space>\n  );\n};\n\nexport default App;\n";;
 9 │  4 │
   ╰────

fatal - [Error: Build with mako failed.]
● Mako ▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨▨ (46%) before resolve before resolve                                                                                                                                fatal - A complete log of this run can be found in:
fatal - D:\ant-design\node_modules\.cache\logger\umi.log
fatal - Consider reporting a GitHub issue on https://github.com/umijs/umi/issues

Environment Info

antd: 5.20.6 React: 18.3.1 System: Windows 11 Node: v20.12.2

sorrycc commented 5 days ago

Duplicated with https://github.com/umijs/mako/issues/1580

stormslowly commented 4 days ago

@Jinbao1001 plz have a look, this path maybe assembled by dumi

Jinbao1001 commented 4 days ago

I made a mistake, and I'll fix it immediately.