-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
@wordpress/create-block throws TypeError: Invalid Version: 0.32 #28965
Comments
It should work with your versions of Node.js and npm. It's a very strange error that I see for the first time. Thank you for reporting! |
I tried to reproduce with the exact same versions of node and npm. Everything finished without any issues. The only difference is that I use macOS Big Sur v11.2.1. It looks like it's OS-specific then. |
Thank you for checking out. Meanwhile, I have found the troublemaker, by running the command: $ npx check-node-version --print
npx : 13 installé(s) en 1.685s
node: 14.15.4
npx: 6.14.11
yarn: given version not semver-compliant
npm: 6.14.11 It appears that yarn version was the causing the TypeError: $ yarn --version
0.32 Except... it's not the right yarn! This yarn is part of the cmdtest debian package that is installed by default on Ubuntu 17, and 18 as it appears. A related issue. So I had to uninstall it from my system (I don't plan on testing Unix commands in a near future): $ sudo apt remove cmdtest And now I am able to use I'm closing the issue, since this is not a problem with Gutenberg. |
Thank you for reporting back your findings. I'm surprised that |
I found where the issue comes from: It probably errored when checking the version of yarn as it iterates over all programs supported. In the latest version they fixed it - it only uses the listed programs. I will update the dependency. |
I have a patch ready in #29066 that might improve things, thank you again @raaaahman 💯 |
Description
While trying to follow the Create a block tutorial, I ran into an issue trying to use the command
npx @wordpress/create-block starter-block
.Step-by-step reproduction instructions
npx @wordpress/create-block starter-block
OR
npm init @wordpress/block tutorial-block
Expected behaviour
I expected to scaffold a WordPress plugin directory with a custom block.
Actual behaviour
I had the following issue:
I can't figure out which version this
0.32
refers to.Code snippet (optional)
Here are the output of some commands:
Device information
Thanks!
The text was updated successfully, but these errors were encountered: