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

Unable to install using yarn #45

Open
osenvosem opened this issue Sep 5, 2017 · 8 comments
Open

Unable to install using yarn #45

osenvosem opened this issue Sep 5, 2017 · 8 comments

Comments

@osenvosem
Copy link

osenvosem commented Sep 5, 2017

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
@pcj
Copy link

pcj commented Oct 28, 2017

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.

@andreypopp
Copy link
Collaborator

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

@pcj
Copy link

pcj commented Oct 28, 2017

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

@jordwalke
Copy link
Member

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

@pcj
Copy link

pcj commented Oct 28, 2017

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

@jordwalke
Copy link
Member

jordwalke commented Oct 28, 2017

@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
Copy link
Member

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.

jondot added a commit to jondot/reasonml.github.io that referenced this issue May 13, 2018
Hi,
Just finished a two-hour session trying to figure out why Reason CLI tools won't install.
Apparently it choked on a path which it thought `is too deep inside filesystem, Esy won't be able to relocate binaries`.
This specific error was also silent, so I had to go into the esyBuildRelease shell script and make it spit it out.

This [issue](reasonml/reason-cli#45) hinted using Yarn would do off with all that, and it did, installing quickly and happily. 

Might also be worth recommending Yarn as a default running for installing over npm, but I will leave that to more knowledgeable documentation editor.
@ruifortes
Copy link

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

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

5 participants