elm-test
elm-test copied to clipboard
Compilation fails on running tests
Hi,
this might be a duplicate, or might even be an issue of another project. Anyway, since I couldn't resolve it and since it happens when running elm-app test (which should run elm-test behind the scenes, I suppose) I will post it here. I tried several things to resolve but couldn't make it work. Sometimes re-installing the packages helped, sometimes not. If this is a setup / configuration problem I'd be very glad if someone could help me out and this issue can be closed. Thanks!
Reproduce the error
OS
Use fresh Ubuntu box (I used Ubuntu 17.04 Zesty Zapus (Final) from osboxes.org)
nvm
Install nvm (v0.33.2):
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
Node
Install Node (v8.1.2)
nvm install node
Elm
Install Elm (v0.18.0)
npm install -g elm
create-elm-app
Install create-elm-app (v0.8.6)
npm install create-elm-app -g
Create new Elm app and run tests
Create a new app and cd to the folder:
create-elm-app my-app
Run tests works:
elm-app test
output:
elm-test
--------
Running 4 tests. To reproduce these results, run: elm-test --fuzz 100 --seed 1469746098
↓ Tests
↓ A Test Suite
✗ This test should fail
failed as expected!
TEST RUN FAILED
Duration: 7 ms
Passed: 3
Failed: 1
Add new dependencies and run tests again
Install elm-lang/http in main project and test project:
elm-app package install -y elm-lang/http
Running the test command again now fails:
Compilation failed for /home/osboxes/my-app/elm-stuff/generated-code/elm-community/elm-test/src/Main496aafb3c4c5cf7d1e284a81de8ccea9.elm
Deleting packages and re-installing sometimes made tests work again, but then after making some other change compilation fails again.
Related to #178, #176?
@mgold The suggested solution from #178:
I deleted the elm-stuff directory and all of its content in the main folder, and re-running elm-test worked for me
doesn't work for me. Even though, it occasionally makes the test's build succeed, it eventually breaks again.
I'll try to install node-test-runner from the current master branch as suggested in #176 and see what that does as soon as I get a chance.
@battermann Any new here?
I found a workaround by using Node 6.x.
I haven't tested it with current node-test-runner, yet.
With latest ubuntu docker image I cannot even install elm. I get this error:
npm install -g elm
npm WARN deprecated [email protected]: Use uuid module instead
/root/.nvm/versions/node/v8.1.3/bin/elm -> /root/.nvm/versions/node/v8.1.3/lib/node_modules/elm/binwrappers/elm
/root/.nvm/versions/node/v8.1.3/bin/elm-package -> /root/.nvm/versions/node/v8.1.3/lib/node_modules/elm/binwrappers/elm-package
/root/.nvm/versions/node/v8.1.3/bin/elm-reactor -> /root/.nvm/versions/node/v8.1.3/lib/node_modules/elm/binwrappers/elm-reactor
/root/.nvm/versions/node/v8.1.3/bin/elm-make -> /root/.nvm/versions/node/v8.1.3/lib/node_modules/elm/binwrappers/elm-make
/root/.nvm/versions/node/v8.1.3/bin/elm-repl -> /root/.nvm/versions/node/v8.1.3/lib/node_modules/elm/binwrappers/elm-repl
> [email protected] install /root/.nvm/versions/node/v8.1.3/lib/node_modules/elm
> node install.js
sh: 1: node: Permission denied
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] install: `node install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-07-10T09_46_36_406Z-debug.log
I tried this on Node 8.4.0 and the current elm-test and it worked fine. 🤔
@battermann can you check out https://github.com/rtfeldman/node-test-runner locally and run npm install && npm test && echo "IT PASSED" and let me know if it prints "IT PASSED" at the end?
@rtfeldman Sorry for the delay. I tried it on three different machines (on my local machine running elementary OS, in vagrant box running Ubuntu 17.04 Zesty Zapus, and in Virtual Box image Ubuntu 17.04 Zesty Zapus from osboxes.org) . It all printed "IT PASSED" at the end.