Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem setting up elm with react-elm-components

Tags:

I'm trying to run a basic react project with elm, and for this I am using react-elm-components. I've created the project with create-react-app. I've configurated the webpack directly from the node modules, you can check it here. But it's not working, I'm struggling with this error message:

./src/components/elm/Test.elm Error: Compiler process exited with error Compilation failed -- NO elm.json FILE ------------------------------------------------------------

It looks like you are starting a new Elm project. Very exciting! Try running:

elm init

It will help you get set up. It is really simple!

This command doesn't even exist for me. My project structure is basically like this:

enter image description here

like image 430
Wellyngton Avatar asked Oct 09 '18 13:10

Wellyngton


1 Answers

Looks like the example you started from was targeting Elm 0.18. A lot of things have changed in Elm 0.19 (changelog), including the package file (which was changed from elm-package.json to just elm.json)

If you are just trying out Elm, perhaps you'd be better off installing Elm 0.18 for now just to get the project up and running.

Sidenote - And if you manage to upgrade the projects to Elm 0.19, I'm sure the project maintainers would appreciate a pull request!

like image 142
Chad Gilbert Avatar answered Dec 06 '22 14:12

Chad Gilbert