Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

引入antd mobile报这个错误 #6563

Closed
lihong1232 opened this issue Mar 2, 2024 · 1 comment
Closed

引入antd mobile报这个错误 #6563

lihong1232 opened this issue Mar 2, 2024 · 1 comment
Labels

Comments

@lihong1232
Copy link

Version of antd-mobile

5.34.0

Operating system and its version

Others

Browser and its version

Version 122.0.6261.95 (Official Build) (64-bit)

Sandbox to reproduce

No response

What happened?

Collecting page data ...C:\work\wallet\wallet\node_modules\antd-mobile\cjs\global\global.css:1
:root {
^

SyntaxError: Unexpected token ':'
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
at Module._compile (node:internal/modules/cjs/loader:1220:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at mod.require (C:\work\wallet\wallet\node_modules\next\dist\server\require-hook.js:65:28)
at require (node:internal/modules/cjs/helpers:119:18)
at Object. (C:\work\wallet\wallet\node_modules\antd-mobile\cjs\global\index.js:3:1)

Build error occurred
Error: Failed to collect page data for /home
at C:\work\wallet\wallet\node_modules\next\dist\build\utils.js:1258:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
type: 'Error'
}

Relevant log output

No response

@lihong1232 lihong1232 added the bug label Mar 2, 2024
@IronKinoko
Copy link
Collaborator

看起来是在next.js环境里引入的,先看下这个文档尝试解决
https://mobile.ant.design/zh/guide/ssr

@afc163 afc163 closed this as completed May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants