Cannot compile project when Styled is imported
Hi!
Thank you for your work!
I am new to Elm, so excuse me if I'm asking something obvious.
I've installed elm-styled directly from github with yarn. I added its path to source-directories in elm-package.json.
When I try to use it I get this error:
Module build failed: Error: Compiler process exited with error Compilation failed
I cannot find module 'Native.Css'.
Module 'Styled' is trying to import it.
Do you maybe have an example project setup somewhere with elm-styled that I can copy? Thanks!
@hissfield This is a tricky process that requires a few steps if you really want to get in the weeds. I was able to get this working myself so that is why I am passing on the info.
First, you will need to git clone this repo and also elm-ops-tooling
What I did was cloned elm-ops-tooling into a script folder and this repo inside a vendor folder.
Next do elm package install Skinney/murmur3 since it is a dependency of this repo.
Lastly run this command in the same directory as your elm-package.json:
python scripts/elm-ops-tooling/elm_self_publish.py vendor/elm-styled ./
This is a python script that will self-publish elm-styled and put it as part of your elm-package.json and also in your elm-stuff.
Lastly, after feelings of guilt have subsided for publishing a native module, try out elm-styled in your Elm project!