I am trying to add sci chart in nextjs app and its failing with a message “Aborted(both async and sync fetching of the wasm failed)”.
I have updated next config – webpack with :
const destWasmFolder = “static/chunks/pages”;
config.plugins.push(new CopyPlugin({
patterns: [
{ from: “node_modules/scichart/_wasm/scichart2d.wasm”, to: destWasmFolder },
]
And installed the package copy-files-from-to and created a file “copy-files-from-to.json in the root directory with content:
{
“copyFilesSettings”: {
“whenFileExists”: “overwrite”
},
“copyFiles”: [
{
“from”: “./node_modules/scichart/_wasm/scichart2d.data”,
“to”: “./public/scichart2d.data”
}
]
}
And updated package.json script with “”dev”: “cross-env NODE_OPTIONS=\”-r next-logger\” copy-files-from-to && next dev”
- Ajin Thankachen asked 6 months ago
- You must login to post comments
Hello, check out our example that is using SciChart.React here:
https://github.com/ABTSoftware/scichart-react/tree/main/demos/scichart-react-next
It doesn’t require any next.config updates, it only copies the wasm files to the public folder via script.
- Jim Risen answered 5 months ago
- You must login to post comments
Thats perfect. Its working now
- Ajin Thankachen answered 5 months ago
- last edited 4 months ago
- You must login to post comments
Please login first to submit.