Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Cannot compile project when Styled is imported #18

Open
hissfield opened this issue Sep 16, 2017 · 1 comment
Open

Cannot compile project when Styled is imported #18

hissfield opened this issue Sep 16, 2017 · 1 comment

Comments

@hissfield
Copy link

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!

@arecvlohe
Copy link

arecvlohe commented Sep 23, 2017

@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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants