Hi all,

I have a puzzling situation that I hope someone can shed some light on. I'm 
using elm with elixir, and compiling it with elm-brunch. I'm able to 
'brunch build' without a problem locally, but on the remote heroku servers, 
I get the following problem:

remote:        Running default compile
> remote:        Elm compile: src/rei.elm, in web/elm, to 
> ../static/vendor/rei.js
> remote:        *I cannot find module 'Codefragment'.*
> remote:        
> remote:        Module 'Rei' is trying to import it.
> remote:        
> remote:        Potential problems could be:
> remote:          * Misspelled the module name
> remote:          * Need to add a source directory or new dependency to 
> elm-package.json
> remote:        29 Sep 08:42:47 - error: Compiling of web/elm/src/rei.elm 
> failed. Command failed: ../../node_modules/elm/binwrappers/elm-make --yes 
> --output ../static/vendor/rei.js src/rei.elm
> remote:        I cannot find module 'Codefragment'.
> remote:        
> remote:        Module 'Rei' is trying to import it.
> remote:        
> remote:        Potential problems could be:
> remote:          * Misspelled the module name
> remote:          * Need to add a source directory or new dependency to 
> elm-package.json
> remote:         


I checked that the source_directories are set. my elm-package.json is:


{
>     "version": "1.0.0",
>     "summary": "helpful summary of your project, less than 80 characters",
>     "repository": "https://github.com/user/project.git";,
>     "license": "BSD3",
>     
>
> *"source-directories": [        "src"    ],*
>     "exposed-modules": [],
>     "dependencies": {
>         "elm-lang/core": "4.0.5 <= v < 5.0.0",
>         "elm-lang/html": "1.1.0 <= v < 2.0.0"
>     },
>     "elm-version": "0.17.1 <= v < 0.18.0"
> }


All the elm files are under web/elm/src. my brunch's config files for elm 
is:

  plugins: {
>     elmBrunch: {
>       elmFolder: "web/elm",
>       
>
> *mainModules: [        "src/rei.elm"      ],*
>       outputFolder: "../static/vendor",
>       executablePath: "../../node_modules/elm/binwrappers"
>     },
>     babel: {
>       // Do not use ES6 compiler in vendor code
>       ignore: [/web\/static\/vendor/]
>     }
>   },


Reading brunch-elm code  
<https://github.com/madsflensted/elm-brunch/blob/master/index.js>and the 
mainModules should be correct. However, through trial and error, 
"src/rei.elm" fails on production, but not on my local machine. However, 
using "src/*.elm" seems to not fail in production, but while it compiles, 
it doesn't seem to write to the output. 

Has anyone else run into this? It seems like elm-make has a different 
behavior on macos, compared to on heroku.

For now, I'm just committing the generated file to the repo, which works. 
But I'd rather have the file build in production. If someone has something 
to shed the light on this, I'd really appreciate it.

Wil

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to