ant-design-mobile icon indicating copy to clipboard operation
ant-design-mobile copied to clipboard

support next14 and update doc

Open zhiyongsun opened this issue 1 year ago • 16 comments

Version of antd-mobile

^5.33.2

Operating system and its version

Others

Browser and its version

chrome

Sandbox to reproduce

No response

What happened?

when i added "antd-mobile": "^5.33.2" to "next": "^14.0.3", then i imported button component, got error _ahooks.createUpdateEffect

⨯ node_modules/antd-mobile/cjs/utils/use-isomorphic-update-layout-effect.js (8:72) @ _ahooks ⨯ TypeError: (0 , _ahooks.createUpdateEffect) is not a function

Relevant log output

No response

zhiyongsun avatar Dec 26 '23 05:12 zhiyongsun

"use client" ?

day-xue avatar Dec 26 '23 05:12 day-xue

"use client" ?

yes~

zhiyongsun avatar Dec 26 '23 08:12 zhiyongsun

解决了吗

zb201307 avatar Dec 29 '23 01:12 zb201307

"use client" ?

yes~

我这边是没问题的

day-xue avatar Dec 29 '23 02:12 day-xue

Same happen to me. Are you using the Pages router @zhiyongsun? Cause in the new App router it works fine, but I turned my code to the Pages router (due to an opened issue) and I found this antd-mobile error. Same as you, importing only the Button component.

callmevari avatar Jan 15 '24 01:01 callmevari

Same happen to me. Are you using the Pages router @zhiyongsun? Cause in the new App router it works fine, but I turned my code to the Pages router (due to an opened issue) and I found this antd-mobile error. Same as you, importing only the Button component.

yes, Pages router. app router it works

zhiyongsun avatar Jan 15 '24 14:01 zhiyongsun

Same here, using pages router in Next 14.0.4, got an error just importing Image component

massqeen avatar Jan 16 '24 09:01 massqeen

Page route in Next 14.1.0, antd-mobile 5.34.0, just import Button, has same error.

hugejile avatar Jan 26 '24 06:01 hugejile

NextJS 14.1.3, 问题仍然存在 Collecting page data ..TypeError: (0 , n.createUpdateEffect) is not a function

conversun avatar Mar 13 '24 07:03 conversun

To manually install ahooks version 3.7.2 and configure the transpilePackages option to include 'antd-mobile'

hugejile avatar Mar 22 '24 06:03 hugejile

+1

jianqiao0313 avatar Apr 01 '24 13:04 jianqiao0313

我也有同样的问题

ikangjie avatar May 06 '24 09:05 ikangjie

It's time to deal with this problem

tclxshunquan-wang avatar Aug 06 '24 07:08 tclxshunquan-wang