Rescript-compiler: npm install error on ubuntu

Created on 22 Dec 2018  路  4Comments  路  Source: rescript-lang/rescript-compiler

> [email protected] postinstall /usr/local/lib/node_modules/bs-platform
> node scripts/install.js

fs.js:122
    throw err;
    ^

Error: EACCES: permission denied, copyfile '/usr/local/lib/node_modules/bs-platform/vendor/ninja/snapshot/ninja.linux' -> '/usr/local/lib/node_modules/bs-platform/lib/ninja.exe'
    at Object.copyFileSync (fs.js:1747:3)
    at provideNinja (/usr/local/lib/node_modules/bs-platform/scripts/install.js:81:16)
    at Object.<anonymous> (/usr/local/lib/node_modules/bs-platform/scripts/install.js:264:1)
    at Module._compile (internal/modules/cjs/loader.js:722:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:775:12)
    at startup (internal/bootstrap/node.js:300:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

will supply bug fix via mkdir p

BUILD

Most helpful comment

@frank-dspeed , see https://bucklescript.github.io/docs/en/installation, would this work for you: npm install -g bs-platform --unsafe-perm

All 4 comments

results in

npm WARN tar zlib: unexpected end of file
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-implicit_unpack/Makefile'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-implicit_unpack/implicit_unpack.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-implicit_unpack/implicit_unpack.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-labels/Makefile'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-labels/mixin.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-labels/mixin.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-labels/mixin2.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-labels/mixin2.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-labels/mixin3.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-labels/mixin3.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/Makefile'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/constraints.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/constraints.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/labels.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/labels.ml.principal.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/labels.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/occur_check.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/occur_check.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/polyvars.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/polyvars.ml.principal.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/polyvars.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/records.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/records.ml.principal.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/records.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/variant.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/variant.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/wellfounded.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/wellfounded.ml.principal.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc/wellfounded.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc-bugs/Makefile'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-misc-bugs/pr6303_bad.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/Makefile'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/Test.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/Test.ml.principal.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/Test.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/a.mli'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/aliases.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/aliases.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/b.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/b2.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/b3.mli'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/d.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/firstclass.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/firstclass.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/generative.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/generative.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/pr5911.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules/pr5911.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules-bugs/Makefile'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules-bugs/gatien_baron_20131019_ok.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules-bugs/pr5164_ok.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules-bugs/pr5914_ok.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules-bugs/pr6240_ok.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules-bugs/pr6293_bad.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules-bugs/pr6427_bad.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules-bugs/pr6513_ok.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-modules-bugs/pr6572_ok.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/Exemples.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/Exemples.ml.principal.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/Exemples.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/Makefile'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/Tests.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/Tests.ml.principal.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/Tests.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/pr5619_bad.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/pr5619_bad.ml.principal.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/pr5619_bad.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/pr5858.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/pr5858.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/pr6123_bad.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/pr6123_bad.ml.principal.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/pr6123_bad.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/pr6383.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects/pr6383.ml.reference'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects-bugs/Makefile'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects-bugs/pr3968_bad.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects-bugs/pr4018_bad.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects-bugs/pr4435_bad.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects-bugs/pr4766_ok.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects-bugs/pr4824_ok.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects-bugs/pr4824a_bad.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects-bugs/pr5156_ok.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects-bugs/woodyatt_ok.ml'
npm WARN tar ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/bs-platform-f96384e5/vendor/ocaml/testsuite/tests/typing-objects-bugs/yamagata021012_ok.ml'
npm ERR! code Z_BUF_ERROR
npm ERR! errno -5
npm ERR! zlib: unexpected end of file

npm ERR! A complete log of this run can be found in:

will examin post install scripts i assum hardcoded pathes?

@frank-dspeed , see https://bucklescript.github.io/docs/en/installation, would this work for you: npm install -g bs-platform --unsafe-perm

@bobzhang that worked but i could get it running when i install it local to a project.

Thanks we can close that.

Was this page helpful?
0 / 5 - 0 ratings