elm-community / elm-test

moved to elm-explorations/test
https://github.com/elm-explorations/test
BSD 3-Clause "New" or "Revised" License
339 stars 35 forks source link

EACCES error when installing via npm #245

Open tiziano88 opened 6 years ago

tiziano88 commented 6 years ago

I am getting an error when running the following command:

$ sudo npm install -g elm-test                                                                                                                                  

npm WARN deprecated hoek@2.16.3: The major version is no longer supported. Please update to 4.x or newer
/usr/bin/elm-test -> /usr/lib/node_modules/elm-test/bin/elm-test

> elm-test@0.18.12 install /usr/lib/node_modules/elm-test
> node install.js

Error extracting https://dl.bintray.com/elmlang/elm-test/0.18.12/linux-x64.tar.gz - Error: EACCES: permission denied, open '/usr/lib/node_modules/elm-test/bin/elm-interface-to-json'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/elm-test/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! elm-test@0.18.12 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the elm-test@0.18.12 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/2018-08-21T17_33_53_076Z-debug.log

Seems an inconsistency in the target platform (linux vs mac). Note I am running on linux.

npm version reports the following:

$ npm version                                                                                                                                                   
{ npm: '6.4.0',
  ares: '1.10.1-DEV',
  cldr: '32.0',
  http_parser: '2.8.0',
  icu: '60.1',
  modules: '57',
  nghttp2: '1.25.0',
  node: '8.11.0',
  openssl: '1.0.2o',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.19.1',
  v8: '6.2.414.50',
  zlib: '1.2.11' }
bobwhitelock commented 6 years ago

When you npm install -g elm-test you're installing https://github.com/rtfeldman/node-test-runner, which includes the elm-test CLI tool for running elm-test tests, whereas this repo is for the Elm library for writing Elm tests (I agree this can be slightly confusing :slightly_smiling_face:). So you may get better help if you log your issue there.