The README this is talking about is this one: https://github.com/kevva/elm-bin/blob/master/readme.md
What it is telling you to pay attention to is specifically the instruction about setting ELM_HOME
there.
That you don’t see the README on https://www.npmjs.com/package/elm is cause by the fact that Richared published to npm from a fork of the above repo (https://github.com/rtfeldman/elm-bin), but didn’t include the README in his fork. This is unfortunate, and I’ll open a GitHub issue for this.
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
One thing you could try immediately is to run
sudo npm install -g e...@2.0.0
instead of
sudo npm install -g elm
That should give you the latest version of the installer before Richard’s experimental release. (The version scheme is strange, but indeed @2.0.0
will give you Elm version 0.15.1. Using elm
instead of e...@2.0.0
will actually give you e...@0.15.1-beta
, which is Richard’s experiment with an alternative way of packaging Elm version 0.15.1.)
--
$ npm install -g elm
/usr/local/bin/elm -> /usr/local/lib/node_modules/elm/bin/elm
/usr/local/bin/elm-make -> /usr/local/lib/node_modules/elm/bin/elm-make
/usr/local/bin/elm-package -> /usr/local/lib/node_modules/elm/bin/elm-package
/usr/local/bin/elm-reactor -> /usr/local/lib/node_modules/elm/bin/elm-reactor
/usr/local/bin/elm-repl -> /usr/local/lib/node_modules/elm/bin/elm-repl
> elm@2.0.0 postinstall /usr/local/lib/node_modules/elm
> node lib/install.js
✔ elm pre-build test passed successfully
✔ elm-make pre-build test passed successfully
✔ elm-package pre-build test passed successfully
✔ elm-reactor pre-build test passed successfully
✔ elm-repl pre-build test passed successfully
elm@2.0.0 /usr/local/lib/node_modules/elm
├── async-each-series@0.1.1
├── logalot@2.1.0 (figures@1.4.0, squeak@1.3.0)
└── bin-wrapper@3.0.2 (os-filter-obj@1.0.3, lazy-req@1.1.0, each-async@1.1.1, bin-check@2.0.0, bin-version-check@2.1.0, download@4.4.1)
Now I am surprised. Why do you think that sudo npm install -g elm
and sudo npm install -g e...@2.0.0
would do the exact same thing, when https://www.npmjs.com/package/elm says that (I assume by some action of yours): “0.15.1-beta is the latest of 11 releases”. Isn’t it then to be expected that sudo npm install -g elm
is equivalent to sudo npm install -g e...@0.15.1-beta
?
You say:
Rereading the OP, I’m not actually sure there actually was a .cabal-sandbox directory present (certainly one wouldn’t have to be in order to point PATH at it), or if there was, that npm created it (as opposed to a previous attempt to build from source).
The OP wrote:
I then tried making sure that my .bashrc pointed to the .cabal-sandbox folder inside /usr/local/lib/node_modules/elm, where npm installs Elm. I also used BuildFromSource.hs inside the same folder. I still get the same error.
They had a .cabal-sandbox
folder inside /usr/local/lib/node_modules/elm
. I find this hard to reconcile with “probably that .cabal-sandbox
folder came from something else than their use of the npm
installer”.
So, while npm install -g elm
on your machine might install 2.0.0
, all evidence points tonpm install -g elm
installing 0.15.1-beta
on their machine.
--
I guess at this point the best course of action is to wait for further clarification from OP.
Fair point, although I have no idea why npm would choose to install a different version of the same package depending on which machine ran the exact same command! That would sound like a pretty severe bug for a tool as mature as npm.
I guess at this point the best course of action is to wait for further clarification from OP.
--
You received this message because you are subscribed to a topic in the Google Groups "Elm Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elm-discuss/jY9BNp5HEY4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elm-discuss...@googlegroups.com.
So there was a BuildFromSource.hs
file in the node_modules/elm
folder that you did not put there yourself?
To me, that rules out that e...@2.0.0
was installed, because that does not contain the BuildFromSource.hs
file.
--
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...@googlegroups.com.
It’s even more confusing since the readme at https://github.com/elm-lang/elm-platform mentions a readme that is supposed to say something about an ELM_HOME.
FWIW, there’s already a pull request (https://github.com/elm-lang/elm-platform/pull/98) to remove that mention.
I am brand new to Elm, running Linux Mint.
I started by installing elm from npm:$ sudo npm install -g elm
The install went without any errors. The readme on the elm-platform github page says to look closely at the readme, but I didn't see any readme on the npm page.
I unzipped elm-architecture-tutorial and tried to start elm-reactor in the */1/ directory to see if I could run the counter example. I got the following error.$ elm-reactor
module.js:340
throw err;
^
Error: Cannot find module '/usr/local/lib/node_modules/elm/index'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/lib/node_modules/elm/binwrap.js:2:17)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Can you please check whether what you were trying to install there was e...@2.0.0
or e...@0.15.1
?
The mention of bin-wrapper
lets me suspect you were getting e...@2.0.0
(which is the “old” npm installer, but also installs Elm version 0.15.1, and seems to be working quite well so far for many others), whereas the error reported and encountered by others in this thread was specific to e...@0.15.1
(which is the “new” npm installer, which still has some problems).
--