kevva / elm-bin

elm-platform bin-wrapper that makes it seamlessly available as a local dependency
MIT License
18 stars 5 forks source link

install assertions: elm-react binary doesn't work correctly #28

Open OliverJAsh opened 9 years ago

OliverJAsh commented 9 years ago
$ npm install -g elm
/Users/OliverJAsh/.nvm/versions/node/v0.12.4/bin/elm -> /Users/OliverJAsh/.nvm/versions/node/v0.12.4/lib/node_modules/elm/bin/elm
/Users/OliverJAsh/.nvm/versions/node/v0.12.4/bin/elm-make -> /Users/OliverJAsh/.nvm/versions/node/v0.12.4/lib/node_modules/elm/bin/elm-make
/Users/OliverJAsh/.nvm/versions/node/v0.12.4/bin/elm-package -> /Users/OliverJAsh/.nvm/versions/node/v0.12.4/lib/node_modules/elm/bin/elm-package
/Users/OliverJAsh/.nvm/versions/node/v0.12.4/bin/elm-reactor -> /Users/OliverJAsh/.nvm/versions/node/v0.12.4/lib/node_modules/elm/bin/elm-reactor
/Users/OliverJAsh/.nvm/versions/node/v0.12.4/bin/elm-repl -> /Users/OliverJAsh/.nvm/versions/node/v0.12.4/lib/node_modules/elm/bin/elm-repl

> elm@2.0.0 postinstall /Users/OliverJAsh/.nvm/versions/node/v0.12.4/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
  ✖ The `/Users/OliverJAsh/.nvm/versions/node/v0.12.4/lib/node_modules/elm/vendor/elm-reactor` binary doesn't seem to work correctly
  ✖ elm-reactor pre-build test failed
  ✔ elm-repl pre-build test passed successfully

elm@2.0.0 /Users/OliverJAsh/.nvm/versions/node/v0.12.4/lib/node_modules/elm
├── async-each-series@0.1.1
├── logalot@2.1.0 (figures@1.3.5, squeak@1.2.0)
└── bin-wrapper@3.0.2 (lazy-req@1.0.0, os-filter-obj@1.0.3, each-async@1.1.1, bin-check@2.0.0, bin-version-check@2.1.0, download@4.1.4)
OliverJAsh commented 9 years ago
$ elm-reactor
/Users/OliverJAsh/.nvm/versions/node/v0.12.4/lib/node_modules/elm/vendor/elm-reactor: line 6: /usr/local/bin/elm-reactor-unwrapped: No such file or directory

I have tried:

$ export ELM_HOME="/Users/OliverJAsh/.nvm/versions/node/v0.12.4/lib/node_modules/elm/share"
jvoigtlaender commented 9 years ago

The ELM_HOME thing is needed for proper working of elm-reactor, but its absence shouldn't be responsible for a crash.

You are trying this on MacOS? (@evancz says in https://github.com/kevva/elm-bin/issues/22 that elm-reactor-unwrapped is something used on Mac.)

Maybe this commit accidentally left out elm-reactor-unwrapped. @passy?

ryanmtaylor commented 9 years ago

Can confirm, ran node update -g and now elm-reactor doesn't seem to be working in elm@2.0.0.

/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
  ✖ The `/usr/local/lib/node_modules/elm/vendor/elm-reactor` binary doesn't seem to work correctly
  ✖ elm-reactor pre-build test failed
  ✔ elm-repl pre-build test passed successfully
rtaylor@snoopy:~/Programming/elm $ elm-reactor
/usr/local/lib/node_modules/elm/vendor/elm-reactor: line 6: /usr/local/bin/elm-reactor-unwrapped: No such file or directory

However, npm install -g elm@1.5.2 works perfectly.

seanhess commented 9 years ago

Just trying out elm for the first time and ran into this issue. I installed elm platform, exported the ELM_HOME environment variable as instructed, and got the following error when I ran elm-reactor.

elm-reactor-unwrapped: No such file or directory

Installing 1.5.2 worked for me too.

antonycourtney commented 9 years ago

After a long hiatus I am giving Elm another try. Unfortunately I am also hitting the same issue described here, exactly as reported above. I am running OS X 10.10.4 and using npm 2.1.5.

seanhess commented 9 years ago

Is there some way to fix this without downgrading?

jvoigtlaender commented 9 years ago

I'm not on Mac, so cannot help here. I think @passy uploaded the Mac binaries.

That said, shouldn't the official Elm installer for Mac OS (http://install.elm-lang.org/Elm-Platform-0.15.1.pkg) address your needs?

cflewis commented 9 years ago

:+1: , also having this issue.

Installing the official installer is kinda not great because it's nice to be able to manage all the packages via npm, rather than an installer which could leave files all over the place.

seanhess commented 9 years ago

I didn't even know the installer existed. I don't remember which page I got setup instructions from but I'm pretty sure it didn't mention it. I'll give it a shot thanks!

On Wednesday, August 12, 2015, Chris Lewis notifications@github.com wrote:

[image: :+1:] , also having this issue.

Installing the official installer is kinda not great because it's nice to be able to manage all the packages via npm, rather than an installer which could leave files all over the place.

— Reply to this email directly or view it on GitHub https://github.com/kevva/elm-bin/issues/28#issuecomment-130535228.

dmcclory commented 9 years ago

I'm new to elm & was just trying to walk through the elm-architecture-tutorial. I had a bear of a time getting elm-reactor to work. npm install -g elm@1.5.2 installs perfectly fine on my mac, but the Elm Platform version for that is just '0.15', but the elm-architecture-tutorial requires at least 0.15.1.

It looks like npm install -g elm is not writing elm-reactor-unwrapped to the right directory. Then, because that file doesn't exist, we get the "binary doesn't seem to work correctly" error message on install:

I tried running the binary, and got this error message:

/usr/local/lib/node_modules/elm/vendor/elm-reactor: line 6: /usr/local/bin/elm-reactor-unwrapped: No such file or directory

and when I ls in that directory, the unwrapped version isn't there.

I cloned the repo, unzipped the OSX binary, and saw that the elm-reactor-unwrapped was there, so that rules out the possibility that it's been dropped from the tar.gz file, as @jvoigtlaender suggested. When I copied that into /usr/local/bin/, elm-reactor started working.

trobertsonsf commented 9 years ago

You can symlink the file to get it to work

ln -s /usr/local/lib/node_modules/elm/vendor/elm-reactor-unwrapped /usr/local/bin/elm-reactor-unwrapped

Should really take a look at the npm installer to see what's going on and get a real fix for Mac.

Fresheyeball commented 8 years ago

:+1: Thanks @trobertsonsf that worked for me.

damassi commented 8 years ago

Fix worked for me as well

meadorjc commented 8 years ago

I was having the same error on ubuntu using 'npm install --global elm'

Seems to have resolved itself after running the following WITHOUT passing any arguments: elm-make elm-package elm-reactor elm-repl

Then run 'npm install --global elm' again and elm passes all tests, but I'm not still sure what the real issue was.

Running these required that I install git, so maybe that had something to do with it?