gdotdesign / elm-ui

UI library for making web applications with Elm
https://elm-ui.netlify.com
BSD 2-Clause "Simplified" License
920 stars 39 forks source link

elm pkg install error #18

Closed larryhengl closed 8 years ago

larryhengl commented 8 years ago

Hi, thanks for sharing this project.

I installed elm-ui from npm globally (had to use sudo since it wasn't local), then ran init (and also later tried new) to scaffold a new project, then cd to new project folder and ran elm-ui install ... but got the following error:

Installing elm packages...
events.js:154
      throw er; // Unhandled 'error' event
      ^

Error: spawn /usr/local/lib/node_modules/elm-ui/node_modules/elm/Elm-Platform/0.16.0/.cabal-sandbox/bin/elm-package ENOENT
    at exports._errnoException (util.js:856:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:474:9)
    at process._tickCallback (node.js:388:17)
    at Function.Module.runMain (module.js:449:11)
    at startup (node.js:139:18)
    at node.js:999:3

I have no Elm-Platform/ in the spawn path. I do have elm 0.16.0 installed.

> elm
Elm Platform 0.16.0 - a way to run all Elm tools
...

using node v5.5.0 npm v3.3.12

any ideas?

thx!

gdotdesign commented 8 years ago

Hey, is there any errors when installing Elm-UI? It seems that for some reason elm-platform didn't install the binaries.

Someone had a similar issue and the problems were some wrong permissions:

/usr/lib/node_modules/elm-ui/node_modules/elm $ sudo npm install
npm WARN cannot run in wd elm@0.16.0 node install.js (wd=/usr/lib/node_modules/elm-ui/node_modules/elm)
larryhengl commented 8 years ago

ok, yeah, i'm seeing the same warning.

so then...

cd /usr/local/lib/node_modules/elm-ui/node_modules/elm && sudo node install.js

...appears to download the binaries, and now running elm-ui install in my scaffolded project works.

peculiar.

firing up the dev server works too with the example page. i'm off and running now. will close this issue.

thanks!

Augustin82 commented 8 years ago

Encountered the same problem, and solved it the same way.

My hunch is that it came to be because I didn't pay attention when installing elm-ui globally: I didn't do it as superuser, it gave an error, I did it again as su, it worked, but I guess it left some stuff hanging.

Anyway, thank you @larryhengl for the instructions =)