Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Error on installation #28

Closed
casprwang opened this issue Apr 30, 2017 · 18 comments
Closed

Error on installation #28

casprwang opened this issue Apr 30, 2017 · 18 comments

Comments

@casprwang
Copy link

casprwang commented Apr 30, 2017

I executed sudo npm install -g git://github.com/reasonml/reason-cli.git#beta-v-1.13.3 on my home dir and got the following errors. (OSX 10.12.4)

npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "git://github.com/reasonml/reason-cli.git#beta-v-1.13.3"
npm ERR! node v6.10.2
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `./performActualInstallAndFixLinks.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script './performActualInstallAndFixLinks.sh'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the reason-cli package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./performActualInstallAndFixLinks.sh
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs reason-cli
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls reason-cli
npm ERR! There is likely additional logging output above.

more on npm debug log

@jordwalke
Copy link
Member

Can you try uninstalling reason-cli and reinstalling it again?

@casprwang
Copy link
Author

casprwang commented May 1, 2017

@jordwalke Yes I executed the following commands in order:

  1. sudo npm uninstall -g git://github.com/reasonml/reason-cli.git#beta-v-1.13.3

2017-05-01 04 57 29
2. sudo npm install -g git://github.com/reasonml/reason-cli.git#beta-v-1.13.3

2017-05-01 04 58 07
3. sudo yarn add global git://github.com/reasonml/reason-cli.git#beta-v-1.13.3

2017-05-01 04 58 57
which got no error but got following lines when executing refmt

ERROR The following dependencies of package "reason-cli-actual" could not be resolved correctly:

  "@opam-alpha/reason", "ocaml", "ocamlBetterErrors" (and 2 more) packages


Did you forget to run "esy install" command?
Failed to get environment:
ERROR The following dependencies of package "reason-cli-actual" could not be resolved correctly:

  "@opam-alpha/reason", "ocaml", "ocamlBetterErrors" (and 2 more) packages


Did you forget to run "esy install" command?

  1. sudo yarn remove global git://github.com/reasonml/reason-cli.git#beta-v-1.13.3
    it returns
yarn remove v0.17.3
[1/3] Removing module global...
[2/3] Removing module git://github.com/reasonml/reason-cli.git#beta-v-1.13.3...
error This module isn't specified in a manifest.
info Visit https://yarnpkg.com/en/docs/cli/remove for documentation about this command.

@jordwalke
Copy link
Member

the instructions for reason-cli say to uninstall like npm uninstall -g reason-cli. Can you try that way just to rule out the possibility that it's not really uninstalling it?

@casprwang
Copy link
Author

casprwang commented May 1, 2017

Sorry,
npm uninstall -g reason-cli gave me nothing, and I got the same error after npm install -g git://github.com/reasonml/reason-cli.git#beta-v-1.13.3

@jordwalke
Copy link
Member

Just to rule it out. Can you mv ~/.esy to somewhere else and try again?

@casprwang
Copy link
Author

casprwang commented May 2, 2017

ok, I moved ~/.esy to another folder, then tried reinstall it and got this error

Error: EACCES: permission denied, mkdir '/Users/wangsong/Library/Caches/Yarn'
    at Error (native)
    at Object.fs.mkdirSync (fs.js:923:18)
    at Function.sync (/usr/local/lib/node_modules/reason-cli/node_modules/mkdirp/index.js:71:13)
    at Object.<anonymous> (/usr/local/lib/node_modules/reason-cli/node_modules/esy/bin/yarn.js:30:8)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "git://github.com/reasonml/reason-cli.git#beta-v-1.13.3"
npm ERR! node v6.10.2
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `./performActualInstallAndFixLinks.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script './performActualInstallAndFixLinks.sh'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the reason-cli package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./performActualInstallAndFixLinks.sh
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs reason-cli
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls reason-cli
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/wangsong/npm-debug.log

~ 23s
❯

I see permission denied, but I'm sure I put sudo before everything.

@jordwalke
Copy link
Member

@andreypop and @bsansouci might have found the cause of this today. Did you recently upgrade to a new Mac OS?

@jordwalke
Copy link
Member

(just to unblock you, you can use the OPAM versions of reason until we figure this out).

@casprwang
Copy link
Author

casprwang commented May 2, 2017

Yes, about a week ago. now on version 10.12.4
Also, to make it clear, by using OPAM you mean opam install reason right? Does it cover the same thing in NPM version?

@Korbin73
Copy link

Korbin73 commented May 3, 2017

Installing from opam worked for me after it failed trying from npm with the same error as the OP.

@jordwalke
Copy link
Member

@wangsongiam Yes, opam installing reason covers most of the same things, but you also want to opam install merlin as well.

@gilbert
Copy link

gilbert commented May 10, 2017

I tried installing today, and am getting the same error. I think this is the cause:

error An unexpected error occurred: "http://gallium.inria.fr/~fpottier/menhir/menhir-20161115.tar.gz: Request failed \"404 Not Found\"".

@jordwalke
Copy link
Member

Thanks for the heads up @gilbert. Looks like menhir's page is down. I'm finding out what's going on, thanks.

@kristojorg
Copy link

Is there a workaround for now that you know of? I installed via opam, and then ran which ocamlmerlin refmt ocamlmerlin-reason and it says none are found. Should I opan install each of these individually as well?

Thanks!

@gilbert
Copy link

gilbert commented May 11, 2017

@kristojorg Installing this worked for me: https://github.com/yunxing/reason-bin

@jordwalke
Copy link
Member

reason-bin works if you just need to install the refmt binary for parsing/printing. Waiting on menhir to put their servers back up to make reason-cli work again. (Reason-cli is a best effort supported tool, but opam is better supported).

@kristojorg If you want to use opam, it should work - you probably don't have your shell setup correctly with the opam command you need to run etc. Is that true?

@jordwalke
Copy link
Member

This should be fixed now! Thanks for your patience. We'll try to get something that makes the open source reason-cli workflow more similar to the internal one.

@nunobaba
Copy link

I bumped on the same installation problem on Archlinux and yarn 1.11. Not sure why but the problem solved itself by running the same command twice:
yarn global add https://github.com/reasonml/reason-cli/archive/beta-v-1.13.7-bin-linux.tar.gz

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants