reason-cli icon indicating copy to clipboard operation
reason-cli copied to clipboard

Unable to install using yarn

Open osenvosem opened this issue 8 years ago • 8 comments

MacOS 10.12.6 Yarn v0.27.5

» sudo yarn global add https://github.com/reasonml/reason-cli/archive/beta-v-1.13.6-bin-darwin.tar.gz
yarn global v0.27.5
warning package.json: No license field
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
⠁
⠁
⠁
⠁
error /Users/srg/.config/yarn/global/node_modules/reason-cli: Command failed.
Exit code: 1
Command: sh
Arguments: -c ./postinstall.sh
Directory: /Users/srg/.config/yarn/global/node_modules/reason-cli
Output:
ERROR:
  /Volumes/Terra/Archive/sync/appdata/.config/yarn/global/node_modules/reason-cli/rel/3.x.x
Could not perform binary build or installation because the location you are installing to
is too 'deep' in the file system. That sounds like a strange limitation, but
the scripts contain shebangs that encode this path to executable, and posix
systems limit the length of those shebang lines to 127.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

On another machine I've got infinite resolving packages (stops on pend package)

yarn global add https://github.com/reasonml/reason-cli/archive/beta-v-1.13.6-bin-darwin.tar.gz            ~/dev 130 ↵
yarn global v0.27.5
warning package.json: No license field
warning No license field
[1/4] Resolving packages...
⠈ pend@~1.2.0

osenvosem avatar Sep 05 '17 00:09 osenvosem

I second this issue. What motivated such a limiting design decision? This makes it near impossible to incorporate reason-cli in many scenarios... Not good.

pcj avatar Oct 28 '17 06:10 pcj

The recent esy release should work with yarn:

yarn global add https://github.com/reasonml/reason-cli/archive/3.0.0-bin-darwin.tar.gz

andreypopp avatar Oct 28 '17 08:10 andreypopp

Yes but the postinstall.sh still fails. Mandating a global install location is the limitation.

In my case, /home/pcj/.cache/bazel/_bazel_pcj/b5f39829d3fb6b9c31bb0d097d1fa7b3/external/reason/node_modules/reason-cli/rel is too deep inside filesystem, Esy 'won'\''t' be able to relocate binaries

pcj avatar Oct 28 '17 08:10 pcj

@pcj is that really a global location? It looks pretty deep.

jordwalke avatar Oct 28 '17 09:10 jordwalke

No, not global. That's the problem (I don't want a global install).

pcj avatar Oct 28 '17 14:10 pcj

@pcj Can I learn a little more about your use case? Technically reason-cli does support local installs of a project (but not if it's too deep because ocaml itself doesn't support being installed at very deep locations in the file system).

However, there are other options for local dependencies on Reason but I'd have to hear more about your use case. What kind of app are you building?

jordwalke avatar Oct 28 '17 21:10 jordwalke

The original issue has been resolved in the latest 3.0.0 release, but I'll keep this open to discuss the "deep paths" use case.

jordwalke avatar Oct 28 '17 21:10 jordwalke

Hi I'm also having this problem using a nvm node installation. I also use pnpm and the install folder gets way too deep. Is there any workaround or should I just stop using nvm? Thanks

ruifortes avatar Nov 01 '19 21:11 ruifortes