WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.46k stars 4.18k forks source link

@wordpress/create-block@latest does not work inside npm/pnpm workspaces. #56059

Open ivanjeremic opened 11 months ago

ivanjeremic commented 11 months ago

Description

The create block package/install script does not work inside npm workspaces. npx @wordpress/create-block@latest does not work if I have an npm workspace and want to install it under /packages

Step-by-step reproduction instructions

  1. create an npm workspace with a /packages folder
  2. Run @wordpress/create-block@latest inside /packages

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

gziolo commented 11 months ago

I couldn't reproduce with a test repository that uses npm workspaces:

Screenshot 2023-11-24 at 13 07 01 Screenshot 2023-11-24 at 12 59 31

Can you provide more details or a sample project that could help here?

ivanjeremic commented 11 months ago

I am on WSL2 and tried pnpm & npm both same error.

github-actions[bot] commented 10 months ago

Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks.

brettsmason commented 3 weeks ago

I recently experienced the same issue. Here is an example repository along with instructions to recreate this: https://github.com/brettsmason/gutenberg-issue-56059

Also tagging @ryanwelcher as we briefly discussed on Slack.