Turbo: Can't add "pnp-vendorize" when I execute yarn install from project root

Created on 23 February 2024, 9 months ago
Updated 9 March 2024, 8 months ago

Problem/Motivation

I'm trying to setup fresh and clearn Drupal project (version 10.2.3) with RefreshLess with the submodule refreshless_turbo. I'm following the instructions provided in web/modules/contrib/refreshless/modules/refreshless_turbo/readme.md. I've installed yarn (version v1.22.10 with node version v20.11.0) and created this package.json in my project root:

{
	"license": "MIT",
	"private": true,
        "workspaces": [
              "web/modules/contrib/refreshless/**!(vendor)/*"
        ]
}

Steps to reproduce

root@drplrefresh_drupal:/var/www# yarn install
yarn install v1.22.21
[1/4] Resolving packages...
error Can't add "pnp-vendorize": invalid package version undefined.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
๐Ÿ’ฌ Support request
Status

Fixed

Version

2.0

Component

Documentation

Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands sebastian hagens Breda, Netherlands

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @sebastian hagens
  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands sebastian hagens Breda, Netherlands
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada ambient.impact Toronto

    It looks like you're using Yarn 1.x which is far too old and did not yet have the Plug'n'Play API/install strategy; you need at least Yarn 3.x or newer. I should add that to the readme when I get a chance.

  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands sebastian hagens Breda, Netherlands

    Check! I'm not familiar with Yarn as wel, but I found out that corepack prepare yarn@stable --activate upgraded to 4.x and now yarn install worked.

    root@drplrefresh_drupal:/var/www# corepack prepare yarn@stable --activate
    Preparing yarn@stable for immediate activation...
    root@drplrefresh_drupal:/var/www# yarn --version
    4.1.0
    root@drplrefresh_drupal:/var/www# yarn install
    โžค YN0000: ยท Yarn 4.1.0
    โžค YN0000: โ”Œ Resolution step
    โžค YN0085: โ”‚ + @hotwired/turbo@npm:8.0.3, and 678 more.
    โžค YN0085: โ”‚ - www@workspace:.
    โžค YN0000: โ”” Completed in 5s 485ms
    โžค YN0000: โ”Œ Fetch step
    โžค YN0013: โ”‚ 678 packages were added to the project (+ 61.54 MiB).
    โžค YN0000: โ”” Completed in 4s 415ms
    โžค YN0000: โ”Œ Link step
    โžค YN0000: โ”‚ ESM support for PnP uses the experimental loader API and is therefore experimental
    โžค YN0007: โ”‚ drupal-refreshless-turbo@workspace:web/modules/contrib/refreshless/modules/refreshless_turbo must be built because it never has been before or the last one failed
    โžค YN0000: โ”” Completed in 2s 52ms
    โžค YN0000: ยท Done with warnings in 12s 55ms
    
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada ambient.impact Toronto

    Yup, that output looks correct to me, so you should have the Turbo library now sitting in the correct location. I actually had to do a similar thing to get modern Yarn working in GitLab CI for the project (see the .gitlab-ci.yml). I'll update the readme tomorrow to add this information.

  • Status changed to Fixed 9 months ago
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada ambient.impact Toronto

    I've added clearer requirements to the readme. Marking as fixed.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024