You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
open the page, You will find that the console reports an error:
⨯ ReferenceError: window is not defined
at __webpack_require__ (C:\Users\fanfa\Documents\test-agora-rtc-sdk-ng\.next\server\webpack-runtime.js:33:43)
at eval (./src/app/page.tsx:8:74)
at (ssr)/./src/app/page.tsx (C:\Users\fanfa\Documents\test-agora-rtc-sdk-ng\.next\server\app\page.js:129:1)
at Object.__webpack_require__ [as require] (C:\Users\fanfa\Documents\test-agora-rtc-sdk-ng\.next\server\webpack-runtime.js:33:43)
digest: "942138213"
What is expected?
the module file is AgoraRTC_N-production.js,simple code:
nextjs will exeute t() // from module.exports = t(); in server,so window is not undefined
"agora-rtm" has the same problem.
What is actually happening?
npm run dev will report an error, but it will not affect the use.
npm run build will report an error and cause packaging failure.
I should be able to avoid reporting errors by importing synchronously, but I don't want to do so.
System Info
nextjs14
Any additional comments?
No response
The text was updated successfully, but these errors were encountered:
AgoraRTC SDK version
4.20.0
Fail Rate
100%
Link to minimal reproduction
https://github.com/BikeF/test-agora-rtc-sdk-ng.git
Steps to reproduce
What is expected?
the module file is AgoraRTC_N-production.js,simple code:
nextjs will exeute
t() // from module.exports = t();
in server,so window is not undefined"agora-rtm" has the same problem.
What is actually happening?
npm run dev will report an error, but it will not affect the use.
npm run build will report an error and cause packaging failure.
I should be able to avoid reporting errors by importing synchronously, but I don't want to do so.
System Info
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: