question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`output` option not passing down to the elm-make

See original GitHub issue

Using elm-webpack-loader 4.1.1 (from package.json), webpack 1.14.0

Maybe I am using the tool wrong, but it seems that the output option in the loader is not properly transmitting the information to elm-make - it appends to a temp filename generated elsewhere.

I have the following line in the webpack.config.js file:

...
module: {
  loaders: [
    ...
    {
        test:    /\.elm$/,
        exclude: [/elm-stuff/, /node_modules/],
        loader:  'elm-webpack?output=/tmp/elm.js',
      },
    ...

And when I run webpack, I get the following message:

ERROR in ./src/Main.elm
Module build failed: Error: Compiler process exited with error ENOENT: no such file or directory, open '/tmp/11707-20012-fp4rvi.9ggr9newmi/tmp/elm.js'

I tried to change this option because when running in a docker container, it kept generating these temp files in my current directory. Is there a misconfiguration from my side? Is it reading something from an environment variable (which would explain the docker weirdness). Sorry if I missed the doc on this.

Thank you in advance for any help

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
baudrencommented, Jan 8, 2017

I am running my application through a bunch of docker files, with docker-compose. The front-end is running with webpack-dev-server.

If I start locally the application, the temp file goes to /tmp/[cryptic-numbers].js, which is fine. However, when run from the docker container, the temp file goes to the current workdir.

Therefore, at each new compilation, I have a new cryptic javascript file in the root directory of my current project. Adding this to .gitignore with some regex matching could work, but what would be really nice is to have them generated elsewhere.

Hope that makes sense!

0reactions
teesloanecommented, Jun 5, 2017

Also running into this exact issue; did you have any luck solving this @baudren?

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Elm make needs to be updated to Elm 0.19.1 - Support
Lo and behold, it's telling me I'm building using Elm v. 0.19.0, not 0.19.1! My elm.json requires 19.1, triggering a version mismatch. If...
Read more >
"-- --output=elm.js" not working as expected in PowerShell #251
I'm currently going through this chapter on elmprogramming.com. ... Usage: <elm-main> [options] [--] [elm make options] -- Output In Wrong ...
Read more >
elm make - Beginning Elm
elm make is a tool for building Elm projects. It takes .elm files and compiles them to JavaScript. In the Building a Simple...
Read more >
Elm reactor - init with flags for 0.19 - Learn
When I used the --output option, it stopped working, sending index.html (or an error message if there is no index.html anymore) to the ......
Read more >
Elm init hangs in mix task - Questions / Help - Elixir Programming ...
I'm trying to set up some custom mix tasks for working with elm but when I call: Mix.shell.cmd("elm init") I get the prompt...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found