I’ve been trying to install bs-platform(the tooling for reasonml) via npm, but have been unable so far.
I have modified the npm prefix to install to a different directory, but it tries to build the ocaml compiler and fails with the following errors:-
./configure: ./sharpbang: /bin/cat: bad interpreter: No such file or directory
./configure: ./sharpbang2: /usr/bin/cat: bad interpreter: No such file or directory
strip: 'tmpheader': No such file
strip: 'tmpheader': No such file
strip: 'tmpheader': No such file
make[2]: *** [Makefile:50: target_camlheader] Error 1
make[2]: *** Waiting for unfinished jobs....
mv: cannot stat 'tmpheader': No such file or directory
make[2]: *** [Makefile:50: camlheader] Error 1
make[1]: *** [Makefile:193: coldstart] Error 2
make: *** [Makefile:143: world.opt] Error 2
Building a local version of the OCaml compiler failed, check the output above for more information. A possible problem is that you don't have a compiler installed.
/home/invokesus/.npm-global/lib/node_modules/bs-platform/scripts/install.js:111
throw e;
^
Error: Command failed: /home/invokesus/.npm-global/lib/node_modules/bs-platform/scripts/buildocaml.sh
./configure: ./sharpbang: /bin/cat: bad interpreter: No such file or directory
./configure: ./sharpbang2: /usr/bin/cat: bad interpreter: No such file or directory
strip: 'tmpheader': No such file
strip: 'tmpheader': No such file
strip: 'tmpheader': No such file
make[2]: *** [Makefile:50: target_camlheader] Error 1
make[2]: *** Waiting for unfinished jobs....
mv: cannot stat 'tmpheader': No such file or directory
make[2]: *** [Makefile:50: camlheader] Error 1
make[1]: *** [Makefile:193: coldstart] Error 2
make: *** [Makefile:143: world.opt] Error 2
at checkExecSyncError (child_process.js:601:13)
at Object.execFileSync (child_process.js:621:13)
at tryToProvideOCamlCompiler (/home/invokesus/.npm-global/lib/node_modules/bs-platform/scripts/install.js:106:27)
at non_windows_npm_release (/home/invokesus/.npm-global/lib/node_modules/bs-platform/scripts/install.js:157:9)
at Object.<anonymous> (/home/invokesus/.npm-global/lib/node_modules/bs-platform/scripts/install.js:188:5)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
Reproduction steps:-
npm i bs-platform
While searching about javascript modules and nix I also came across node2nix, but am not sure how to use it in this context.
Any help would be appreciated.
Thanks!