reasonml / ReasonNativeProject

Reason native compilation starter project
MIT License
203 stars 45 forks source link

Error when running `npm install` on Debian w/o m4 installed #7

Open fortes opened 7 years ago

fortes commented 7 years ago

m4 isn't installed by default on all Debian, so we run into an error trying to run the following:

eval $(dependencyEnv) && nopam && sh -exc echo | m4 && (opam-installer --prefix=$opam_prefix || true)

I manually installed m4 and re-ran, and then it worked.

Here is full log from NPM:

13486 verbose stack Error: conf-m4-actual@4.1.0 postinstall: `eval $(dependencyEnv) && nopam && sh -exc echo | m4 && (opam-installer --prefix=$opam_prefix || true)`
13486 verbose stack spawn ENOENT
13486 verbose stack     at ChildProcess.<anonymous> (/home/fortes/dotfiles/symlinks/local/lib/node_modules/npm/lib/utils/spawn.js:33:16)
13486 verbose stack     at emitTwo (events.js:106:13)
13486 verbose stack     at ChildProcess.emit (events.js:191:7)
13486 verbose stack     at maybeClose (internal/child_process.js:877:16)
13486 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
13487 verbose pkgid conf-m4-actual@4.1.0
13488 verbose cwd /home/fortes/ReasonProject
13489 error Linux 3.14.0
13490 error argv "/usr/bin/nodejs" "/home/fortes/.local/bin/npm" "i"
13491 error node v6.9.1
13492 error npm  v3.10.3
13493 error file sh
13494 error code ELIFECYCLE
13495 error errno ENOENT
13496 error syscall spawn
13497 error conf-m4-actual@4.1.0 postinstall: `eval $(dependencyEnv) && nopam && sh -exc echo | m4 && (opam-installer --prefix=$opam_prefix || true)`
13497 error spawn ENOENT
13498 error Failed at the conf-m4-actual@4.1.0 postinstall script 'eval $(dependencyEnv) && nopam && sh -exc echo | m4 && (opam-installer --prefix=$opam_prefix ||true)'.
13498 error Make sure you have the latest version of node.js and npm installed.
13498 error If you do, this is most likely a problem with the conf-m4-actual package,
13498 error not with npm itself.
13498 error Tell the author that this fails on your system:
13498 error     eval $(dependencyEnv) && nopam && sh -exc echo | m4 && (opam-installer --prefix=$opam_prefix || true)
13498 error You can get information on how to open an issue for this project with:
13498 error     npm bugs conf-m4-actual
13498 error Or if that isn't available, you can get their info via:
13498 error     npm owner ls conf-m4-actual
13498 error There is likely additional logging output above.
13499 verbose exit [ 1, true ]
vramana commented 7 years ago

Did you clear node_modules before you do npm install again?

fortes commented 7 years ago

@vramana Yes, I did that before filing and it fixed the issue. I updated the description.

vramana commented 7 years ago

@jordwalke I think we should add in the README to install m4 on Ubuntu and debian for running npm install.

jordwalke commented 7 years ago

can we package up m4 as an npm package?