whitphx / stlite

In-browser Streamlit 🎈🚀

Home Page:https://edit.share.stlite.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CompileError: WebAssembly.instantiate(): invalid value type 'externref'

gareia opened this issue · comments

Hi, I couldn't find a similar issue, I'd really appreciate it if you could help me.

When running npm run dump I get the following error CompileError: WebAssembly.instantiate() invalid value type 'externref', enable with --experimental-wasm-reftypes @+166

error

I'm using Windows 10. Below is my package.json. I initially thought the issue might be related to the requirements.txt, but even just including Streamlit generates the same error. Additionally, it may be worth mentioning that my default browser was Brave but I changed it to Chrome, however, when opening a new terminal I kept encountering the same error. Thank you for your time.

{
    "name": "xxxxxxxxxxx",
    "version": "0.1.0",
    "main": "./build/electron/main.js",
    "scripts":{
        "dump": "dump-stlite-desktop-artifacts",
        "serve": "cross-env NODE_ENV=production electron .",
        "serveWindows": "electron .",
        "pack": "electron-builder --dir",
        "dist": "electron-builder",
        "postinstall": "electron-builder install-app-deps"
    },
    "build":{
        "files": ["build/**/*"],
        "directories": {
            "buildResources": "assets"
        }
    },
    "devDependencies": {
        "@stlite/desktop": "0.54.0",
        "cross-env": "7.0.3",
        "electron": "30.0.1",
        "electron-builder": "24.13.3"
    },
    "stlite":{
        "desktop":{
            "files": ["aa/bb.py"],
            "entrypoint": "aa/bb.py",
            "requirementsTxtFiles": ["requirements.txt"]
        }
    }
}

Unfortunately I don't have access to Win10 env and can't reproduce the error now.

  • What about deleting and reinstalling your node_modules directory? It has the pyodide subdir so refreshing it may help?
  • Can you share your requirements.txt? If older versions of some packages, it may cause the problem like opencv/opencv#20697 ?