Uncaught TypeError: _flux__WEBPACK_IMPORTED_MODULE_0__.Flux is not a constructor
at Array.eval (index.js:19:12)
at Function.eval [as f] (Main.elm:2219:19)
at A3 (Main.elm:59:28)
at Object.eval [as b] (Main.elm:1978:7)
at _Scheduler_step (Main.elm:1822:20)
at _Scheduler_enqueue (Main.elm:1784:3)
at eval (Main.elm:1812:5)
at eval (Main.elm:1842:4)
Console shows nothing suspicious:
~/dev/wasm/opt/flux/web/ pnpm serve
> flux@4.4.1 serve /opt/wasm/flux/web
> webpack serve
{ WEBPACK_SERVE: true }
🧐 Checking for wasm-pack...
✅ wasm-pack is installed at /Users/me/.cargo/bin/wasm-pack.
ℹ️ Compiling your crate in development mode...
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8080/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.1.225:8080/
<i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::1]:8080/
<i> [webpack-dev-server] Content not from webpack is served from '/opt/wasm/flux/web/public' directory
[INFO]: 🎯 Checking for the Wasm target...
Error: wasm32-unknown-unknown target not found in sysroot: "/opt/homebrew/Cellar/rust/1.63.0"
Used rustc from the following path: "/opt/homebrew/bin/rustc"
It looks like Rustup is not being used. For non-Rustup setups, the wasm32-unknown-unknown target needs to be installed manually. See https://rustwasm.github.io/wasm-pack/book/prerequisites/non-rustup-setups.html on how to do this.
Starting downloads...
● elm/url 1.0.0
● elm/virtual-dom 1.0.2
● elm/core 1.0.5
● myrho/elm-round 1.0.4
● cuducos/elm-format-number 9.0.1
● elm/regex 1.0.0
● elm/json 1.1.3
● elm/html 1.0.0
● elm/time 1.0.0
● elm/browser 1.0.2
● NoRedInk/elm-json-decode-pipeline 1.0.1
Dependencies ready!
Success! Compiled 1 module.
Main ───> /var/folders/br/2jrjybxx7rg0t0by_hsqkgph0000gn/T/202297-68098-esv17x.s1z8b.js
asset index.js 612 KiB [emitted] (name: main)
asset fonts/Inter-upright.var.woff2 215 KiB [emitted] [from: public/fonts/Inter-upright.var.woff2] [copied]
asset index.html 9.09 KiB [emitted]
asset CNAME 17 bytes [emitted] [from: public/CNAME] [copied]
runtime modules 27.3 KiB 12 modules
modules by path ./node_modules/.pnpm/ 158 KiB
modules by path ./node_modules/.pnpm/webpack-dev-server@4.9.0_smhu6mcfcg7aivfsuosc335k3u/node_modules/webpack-dev-server/client/ 53.4 KiB 12 modules
modules by path ./node_modules/.pnpm/webpack@5.72.1_webpack-cli@4.9.2/node_modules/webpack/hot/*.js 4.3 KiB
./node_modules/.pnpm/webpack@5.72.1_webpack-cli@4.9.2/node_modules/webpack/hot/dev-server.js 1.59 KiB [built] [code generated]
+ 3 modules
modules by path ./node_modules/.pnpm/html-entities@2.3.3/node_modules/html-entities/lib/*.js 81.3 KiB
./node_modules/.pnpm/html-entities@2.3.3/node_modules/html-entities/lib/index.js 7.74 KiB [built] [code generated]
+ 3 modules
./node_modules/.pnpm/ansi-html-community@0.0.8/node_modules/ansi-html-community/index.js 4.16 KiB [built] [code generated]
./node_modules/.pnpm/events@3.3.0/node_modules/events/events.js 14.5 KiB [built] [code generated]
modules by path ./src/ 319 KiB
./src/index.js 891 bytes [built] [code generated]
./src/Main.elm 318 KiB [built] [code generated]
./flux/index.js 1 bytes [built] [code generated]
webpack 5.72.1 compiled successfully in 5229 ms
When running http://localhost:8080/ in firefox/chromium mac m1.
Console shows nothing suspicious: