Reputation: 9286
npm i [email protected] -g
elm-make ./src/scripts/MainModule.elm
elm-make: elm-package.json: openBinaryFile: does not exist (No such file or directory)
But the elm-package.json
file is right there in the directory where elm-make
is called from.
Thoughts?
Note: I'm using nvm, in case it matters.
Upvotes: 3
Views: 488
Reputation: 9286
The problem was that package authors were updating packages to support elm .19 by changing elm-package.json
to elm.json
but not bumping up major versions of their packages.
Upvotes: 0
Reputation: 2955
@HParker is right, the only way to reproduce it is following these steps:
elm-make
and let it install all the dependencieselm-package.json
fileelm-make
againIf it's not your case you can debug what's going using strace
, e. g.
strace -yfv elm-make 2>&1 | grep elm-package.json
Example output:
[pid 32319] openat(AT_FDCWD, "elm-package.json", O_RDONLY|O_NOCTTY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
[pid 32319] write(2<pipe:[427229]>, "elm-package.json: openBinaryFile"..., 76elm-package.json: openBinaryFile: does not exist (No such file or directory)) = 76
If it tries to open elm-package.json
in current working directory you will see AT_FDCWD
variable, if not you should see the full path.
Upvotes: 0
Reputation: 1637
I am able to reproduce the error by deleting elm-package.json
, but leaving the elm-stuff/
directory. You should be able to fix this by deleting your elm-stuff/
directory and letting elm-make
rebuild the project for you.
For reference, issue here: https://github.com/elm-lang/elm-make/issues/171
Upvotes: 2