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
I upgraded to undici version 6.7.0 in a specific library I'm using, and I encountered a compilation error.
While tracing the issue, I found that it originated from the file 'lib/web/fetch/util.js'.
And the file is being compiled through the SWC loader in Next.js.
Of course, it could be a different error, but I'm curious if the exception handling within the FastIterableIterator class in the createIterator function in that file is correct.
classFastIterableIterator{/** @type {any} */
#target;
...
next(){
...
if(typeofthis!=='object'||this===null||!(#targetinthis)){thrownewTypeError(`'next' called on an object that does not implement the iterator interface.`);}
...
}
...
I'm curious whether the part where the exception handling is performed on line 776 should be changed from !(#target in this) to !(this.#target in this).
Logs & Screenshots
Environment
Mac M1 Pro
Next.js 14.0.1
Node v20.10.0
The text was updated successfully, but these errors were encountered:
@fersan96 Hello, Unfortunately, I couldn't resolve the issue. I had to downgrade the version of undici.
but it seems like Next.js parser issue. Check this #2954. It might be helpful to you
Bug Description
I upgraded to undici version 6.7.0 in a specific library I'm using, and I encountered a compilation error.
While tracing the issue, I found that it originated from the file 'lib/web/fetch/util.js'.
And the file is being compiled through the SWC loader in Next.js.
Of course, it could be a different error, but I'm curious if the exception handling within the
FastIterableIterator
class in thecreateIterator
function in that file is correct.I'm curious whether the part where the exception handling is performed on line 776 should be changed from
!(#target in this)
to!(this.#target in this)
.Logs & Screenshots
Environment
Mac M1 Pro
Next.js 14.0.1
Node v20.10.0
The text was updated successfully, but these errors were encountered: