我正在使用cloudinary-react 库,当我将 Image 组件添加到项目中时,遇到以下错误消息:
在 DOM 中
TypeError: Cannot read property 'Component' of undefined
at _callee3$ (http://localhost:3000/_next/-/main.js:3977:50)
at tryCatch (http://localhost:3000/_next/-/commons.js:36939:40)
at Generator.invoke [as _invoke] (http://localhost:3000/_next/-/commons.js:37230:22)
at Generator.prototype.(anonymous function) [as next] (http://localhost:3000/_next/-/commons.js:36991:21)
at step (http://localhost:3000/_next/-/commons.js:3724:30)
at http://localhost:3000/_next/-/commons.js:3742:14
at F (http://localhost:3000/_next/-/commons.js:2033:28)
at http://localhost:3000/_next/-/commons.js:3721:12
at doRender (http://localhost:3000/_next/-/main.js:3999:18)
at Object._callee$ (http://localhost:3000/_next/-/main.js:3891:20)
在开发工具中
Warning: React attempted to reuse markup in a container but the checksum was invalid.
This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting.
React injected new markup to compensate which works but you have lost many of the benefits of server rendering.
Instead, figure out why the markup being generated is different on the client or server:
(client) tid="1"><div class="error" data-jsx="676
(server) tid="1"><div class="wrapper" data-jsx="2
Image 组件采用cloudName
& publicId
。是publicId
一个字符串,表示 Cloudinary API 服务器上附加到用户的cloudName
.难道这是 CORS 问题导致出现此错误?我不太确定这在说什么。