Step-by-Step Guide to Fix the Issue:
Create a new Rspeedy project:
npm create rspeedy@latest
Navigate to the project directory:
cd 'project_name'
Modify the package.json:
"@lynx-js/react-rsbuild-plugin": "^0.9.0" and change it to:
"@lynx-js/react-rsbuild-plugin": "npm:@lynx-js/react-rsbuild-plugin-canary@^0.9.0"
Run npm install:
npm install
Double-check package-lock.json:
package-lock.json and verify that the version for @lynx-js/react-rsbuild-plugin is resolved to @lynx-js/react-rsbuild-plugin-canary. It should look like:
"node_modules/@lynx-js/react-rsbuild-plugin": {
"name": "@lynx-js/react-rsbuild-plugin-canary",
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/@lynx-js/react-rsbuild-plugin-canary/-/react-rsbuild-plugin-canary-0.9.0.tgz"
}
Fix the index.js file:
node_modules\@lynx-js\tasm\index.js, search for:
let encode = encode_napi;
let encode = getEncodeMode();
Thanks to Xuanyi Fu for providing the solution!