admin管理员组文章数量:1244324
I have a problem rendering a dropzone with next.js and mantine. /others/dropzone/
import:
dropzone
error message
this is an code example of my problem =/src/App.tsx
Maybe it's a problem with my node version? Currently, I use node 18.14.2
I have a problem rendering a dropzone with next.js and mantine. https://mantine.dev/others/dropzone/
import:
dropzone
error message
this is an code example of my problem https://codesandbox.io/s/mantine-forked-kixzh7?file=/src/App.tsx
Maybe it's a problem with my node version? Currently, I use node 18.14.2
Share Improve this question edited Mar 8, 2023 at 16:27 est_br96 asked Mar 8, 2023 at 15:03 est_br96est_br96 431 silver badge4 bronze badges 1- Please [don't use images of code9(meta.stackoverflow./questions/285551/…) and [provide a minimal reproducible example}(stackoverflow./help/minimal-reproducible-example) – Moritz Ringler Commented Mar 8, 2023 at 16:17
2 Answers
Reset to default 10In my case, the error was like this when I tried to use Burger from mantine/core:
TypeError: (0 , mantine_hooks__WEBPACK_IMPORTED_MODULE_1_.useDisclosure) is not a function or its return value is not iterable
I added "use client" to the ponent's file and error disappeared.
The problem is being caused by nonmatching version of "@mantine/core" and "@mantine/dropzone".
Your package.json
most likely looks like this.
...
"@mantine/core": "^5.9.4",
"@mantine/dates": "^5.9.4",
"@mantine/dropzone": "^6.0.1",
"@mantine/form": "^5.9.4",
"@mantine/hooks": "^5.9.4",
...
To fix the error, please go to your package.json
, change the the "@mantine/dropdown"'s version to match the other package's version number then run npm install
or yarn install
本文标签:
版权声明:本文标题:javascript - TypeError: (0 , _mantine_core__WEBPACK_IMPORTED_MODULE_0__.rem) is not a function next.js Dropzone - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1740201554a2240308.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论