79494030

Date: 2025-03-08 07:24:15
Score: 1
Natty:
Report link

Step-by-Step Guide to Fix the Issue:

  1. Create a new Rspeedy project:

    npm create rspeedy@latest
    
  2. Navigate to the project directory:

    cd 'project_name'
    
  3. Modify the package.json:

    • Search for "@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"
      
  4. Run npm install:

    npm install
    
  5. Double-check package-lock.json:

    • Open 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"
      }
      
  6. Fix the index.js file:

    • Open node_modules\@lynx-js\tasm\index.js, search for:
      let encode = encode_napi;
      
    • Change it to:
      let encode = getEncodeMode();
      

Thanks to Xuanyi Fu for providing the solution!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Abuubakar Ciise