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
When I try to add a new file with NextJS template, I get this error: TypeError: Arguments must be Buffers.
But it works fine with the React template. The error is maybe due to the new nodebox version?
The error occured when I call the addFile function:
sandpack.addFile("/myFile.ts","test");
I tried to change the extension of the new file, the path and the value, but I always get the same error.
When I debug with Safari, I saw that there is a buffer compare function that takes 2 arguments 'a' and 'b'.
The compare function is run for each file and every one works except the new File. We can see that the 'a' buffer seems to work with the "test" value translated in an array: [116, 101, 115, 116]. But the 'b' buffer is undefined unfortunately. So it throws the error: "Arguments must be Buffers".
Bug report
Packages affected
Description of the problem
When I try to add a new file with NextJS template, I get this error:
TypeError: Arguments must be Buffers.
But it works fine with the React template. The error is maybe due to the new nodebox version?
The error occured when I call the addFile function:
I tried to change the extension of the new file, the path and the value, but I always get the same error.
When I debug with Safari, I saw that there is a buffer compare function that takes 2 arguments 'a' and 'b'.
The compare function is run for each file and every one works except the new File. We can see that the 'a' buffer seems to work with the "test" value translated in an array: [116, 101, 115, 116]. But the 'b' buffer is undefined unfortunately. So it throws the error: "Arguments must be Buffers".
Thank you for any help!
Your Environment
dependencies: {
"@codesandbox/sandpack-react": "^2.0.17",
"next": "13.1.6",
"react": "18.2.0",
"react-dom": "18.2.0"
}
Don't work on Arc, Chrome and Safari.
MacOS Ventura 13.1
The text was updated successfully, but these errors were encountered: