elmish-getting-started
elmish-getting-started copied to clipboard
Error when npm starting the project
I've been trying to get Elmish to work with React for a while now today and failing. Tomorrow, I'll probably open an issue on the elmish repo asking for concrete instructions as the template as well as one of the sample projects on the elmish repo are broken. I've been running into various crazy bugs today.
So far only the SAFE Dojo and sample-react-todomvc have worked for me. But the issue with those is that they have a lot of dependencies, so I am not sure what should be a minimalist example.
Anyway, this is what happens after I clone this repo:
PS E:\Webdev\Fable\elmish-getting-started> npm install
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
added 384 packages, and audited 385 packages in 20s
44 packages are looking for funding
run `npm fund` for details
12 vulnerabilities (2 low, 9 high, 1 critical)
To address all issues, run:
npm audit fix
Run `npm audit` for details.
PS E:\Webdev\Fable\elmish-getting-started> npm start
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
> start
> webpack-dev-server
<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.14:8080/
<i> [webpack-dev-server] Content not from webpack is served from 'E:\Webdev\Fable\elmish-getting-started\dist' directory
fable-compiler 2.13.0
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
fable: Compiled src\App.fsproj
asset main.js 655 KiB [emitted] (name: main)
runtime modules 27 KiB 13 modules
modules by path ./node_modules/ 199 KiB
modules by path ./node_modules/webpack-dev-server/client/ 52.6 KiB 12 modules
modules by path ./node_modules/webpack/hot/*.js 4.3 KiB 4 modules
modules by path ./node_modules/html-entities/lib/*.js 81.3 KiB 4 modules
modules by path ./node_modules/url/ 37.4 KiB 3 modules
modules by path ./node_modules/querystring/*.js 4.51 KiB
./node_modules/querystring/index.js 127 bytes [built] [code generated]
./node_modules/querystring/decode.js 2.34 KiB [built] [code generated]
./node_modules/querystring/encode.js 2.04 KiB [built] [code generated]
./node_modules/ansi-html-community/index.js 4.16 KiB [built] [code generated]
./node_modules/events/events.js 14.5 KiB [built] [code generated]
modules by path ./src/ 64 bytes
./src/App.fsproj 25 bytes [built] [code generated]
./src/App.fs 39 bytes [built] [code generated] [1 error]
ERROR in ./src/App.fs
Module build failed (from ./node_modules/fable-loader/index.js):
Error: File E:/Webdev/Fable/elmish-getting-started/src/App.fs cannot be found in source list:
(E:/Webdev/Fable/elmish-getting-started/src/App.fs)
at E:\Webdev\Fable\elmish-getting-started\node_modules\fable-loader\index.js:98:22
at processTicksAndRejections (node:internal/process/task_queues:96:5)
@ ./src/App.fsproj 1:0-25 1:0-25
webpack 5.64.2 compiled with 1 error in 11616 ms
Related to this issue, I finally managed to get a Fable.Elmish project to run from scratch using the advice in this thread. The error in your own starter project is completely different though.
Hi @mrakgr sorry the project is really outdated. I am planning on updating the book very soon and all of it's example projects. Was waiting on fable to become stable v4 but that has been delayed :/
any news on this getting updated? I'd really like to use Elmish on a project