Skip to content

Deploy trying to install a bad version of Yarn? #787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
noelrappin opened this issue Sep 12, 2017 · 5 comments
Closed

Deploy trying to install a bad version of Yarn? #787

noelrappin opened this issue Sep 12, 2017 · 5 comments

Comments

@noelrappin
Copy link

I'm not completely sure what's going on here, but I'm getting the following output from an attempt to deploy a project with the Webpacker 3.x and Capistrano:

00:07 deploy:assets:precompile
      01 ~/.rvm/bin/rvm default do bundle exec rake assets:precompile
      01 yarn install v0.21.3
      01 [1/4] Resolving packages...
      01 [2/4] Fetching packages...
      01 error @rails/[email protected]: The engine "yarn" is incompatible with this module. Expected version ">=0.25.2".
      01 error Found incompatible module
      01 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
      01 Webpacker requires Yarn >= 0.25.2 and you are using 0.21.3
      01 Please upgrade Yarn https://yarnpkg.com/lang/en/docs/install/

Both the local machine and the server have Yarn 1.0.1 installed globally, so I'm not sure why the asset precompile is trying to install yarn at all, let alone trying to install a version that is too old?

Has anybody seen anything like this?

@gauravtiwari
Copy link
Member

gauravtiwari commented Sep 12, 2017

@noelrappin That's just yarn install task: https://github.com/rails/webpacker/blob/master/lib/tasks/webpacker/compile.rake#L30

which is used for installing all dependencies before running webpacker:compile. Are you sure server version is 1.0.1?

@noelrappin
Copy link
Author

noelrappin commented Sep 12, 2017

Server version is 1.0.1, yes.

$ yarn --version
1.0.1

So, a) why is the yarn:install task running, b) why isn't it finding the already installed yarn, and c) why is it installing a version so old that the rest of the system won't run?

@noelrappin
Copy link
Author

Hmm, might be an inconsistency with RVM on the server side.

@gauravtiwari
Copy link
Member

So, a) why is the yarn:install task running,

For installing dependencies of your JS app: https://github.com/rails/webpacker/blob/master/lib/tasks/webpacker/yarn_install.rake

b) why isn't it finding the already installed yarn,

I am not sure about this one. Perhaps you could debug the version of yarn while deploying? May be it's getting overwritten?

and c) why is it installing a version so old that the rest of the system won't run?

It doesn't install yarn

@noelrappin
Copy link
Author

Okay, part of the issue here is a weird server side config for my yarn version, so I'll close this here in deference to the existing issue #405

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

No branches or pull requests

2 participants