Hi, I’m experiencing an issue running elm-test. It fails saying it can’t find node_module/.bin/elm.
I’m using a basic .travis.yml config:
language: elm
elm:
- "0.19.0"
The error I get is:
Unhandled exception while running the tests: { Error: spawn node_modules/.bin/elm ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
at onErrorNT (internal/child_process.js:407:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:11)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn node_modules/.bin/elm',
path: 'node_modules/.bin/elm',
spawnargs:
[ 'make',
'/home/travis/build/chaplean/elm-symfony-bridge/tests/ElmTest.elm',
'/home/travis/build/chaplean/elm-symfony-bridge/tests/MainTest.elm',
'/home/travis/build/chaplean/elm-symfony-bridge/tests/Routing/ParserTest.elm',
'/home/travis/build/chaplean/elm-symfony-bridge/tests/Routing/TranspilerTest.elm',
'/home/travis/build/chaplean/elm-symfony-bridge/tests/StringUtilTest.elm',
'/home/travis/build/chaplean/elm-symfony-bridge/tests/Translation/ParserTest.elm',
'/home/travis/build/chaplean/elm-symfony-bridge/tests/Translation/TranspilerTest.elm',
'/home/travis/build/chaplean/elm-symfony-bridge/tests/UnindentTest.elm',
'--output',
'/dev/null' ] }
The command "elm-format --validate . && elm-test" exited with 1.
There was some discussion about this on the elm slack and apparently not everyone was affected (with the same .travis.yml).
As a workaround I can define the command to run in my package.json and then call it in the .travis.yml.
package.json:
{
…
"scripts": {
"ci-test": "elm-test"
},
…
}
.travis.yml:
language: elm
elm:
- "0.19.0"
script:
- npm run ci-test
Using that the tests run without any issue.
As the travis log asks for, here are relevant mentions @rtfeldman.