Skip to content

Handle new yarn 4 requirement #17

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

Merged
merged 4 commits into from
Mar 26, 2024
Merged

Conversation

rfay
Copy link
Contributor

@rfay rfay commented Mar 24, 2024

There are a couple of problems with the new yarn v4 requirements for core.

This PR

  • enables corepack
  • Used ddev yarn in the core directory, which seems to work whereas the ddev exec yarn --cwd does not, which I assume is a bug in yarn/node

Test with

ddev get https://github.com/rfay/ddev-drupal-core-dev/tarball/20240324_yarn_problems

@T-Fletcher
Copy link

This version still throws a yarn error. I was able to run your branch after running ddev exec corepack enable though.

$ git clone https://git.drupalcode.org/project/drupal.git drupal-test6
$ cd drupal-test6/ && ddev config --project-type=drupal10
$ cd drupal-test6
$ ddev start
$ ddev get https://github.com/rfay/ddev-drupal-core-dev/tarball/20240324_yarn_problems
Downloading https://github.com/rfay/ddev-drupal-core-dev/tarball/20240324_yarn_problems 
20240324_yarn_problems_1584679238.tar.gz 12.43 KiB / ? [-----=---------] 127.30% 0s 

Installing project-level components: 
👍 web-build/Dockerfile 
👍 docker-compose.core-dev-selenium.yaml 
👍 core-dev/phpunit-firefox.xml 
👍 core-dev/phpunit-chrome.xml 
👍 commands/web/drupal 
👍 commands/web/phpunit 
👍 commands/web/nightwatch 
👍 core-dev/gitignore 
👍 core-dev/.env 
👍 core-dev/src/Command/AdminLoginCommand.php 
👍 core-dev/src/Command/BootCommand.php 
👍 core-dev/src/Command/CacheCommand.php 
👍 core-dev/src/Command/TestCommand.php 
👍 core-dev/src/Command/TestBrowserCommand.php 
👍 core-dev/src/Command/UninstallCommand.php 

Executing post-install actions: 
error This project's package.json defines "packageManager": "[email protected]". However the current global version of Yarn is 1.22.21.

Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out https://yarnpkg.com/corepack.
Failed to run yarn : exit status 1
 
👎  
Could not process post-install action (6) '' 

@rfay
Copy link
Contributor Author

rfay commented Mar 25, 2024

Ah, you have to do a ddev restart after ddev get https://github.com/rfay/ddev-drupal-core-dev/tarball/20240324_yarn_problems

I guess we need to add that to the add-on, or else do this a different way. Thanks @T-Fletcher

@rfay
Copy link
Contributor Author

rfay commented Mar 25, 2024

Thanks for the careful look @T-Fletcher - Please try again with

ddev get https://github.com/rfay/ddev-drupal-core-dev/tarball/20240324_yarn_problems

Also, please use the updated steps in your https://github.com/justafish/ddev-drupal-core-dev/pull/16/files

@T-Fletcher
Copy link

Thanks @rfay, I can confirm your latest version works for me with the updated steps

@justafish
Copy link
Owner

Thank you!

@justafish justafish merged commit 45b9f7b into justafish:main Mar 26, 2024
@rfay rfay mentioned this pull request Mar 26, 2024
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

Successfully merging this pull request may close these issues.

3 participants