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 - 'wp-create-block' is not recognized as an internal or external command, operable program or batch file. #38793
Comments
@andornagy Thanks for reporting this. I tested node 14 and 16 and both seemed to work ok, but then I'm on a mac. So it sounds like there might be an issue on Windows. Are you using the standard Windows command prompt? Or one of the linux subsystems for Windows? I remember @gziolo recently added some testing for create block on Windows and ran into some issues, so might have some ideas about this - #38368. |
@talldan |
@talldan I tried the base windows terminal and power shell. Both as normal and run as admin. Same issue. And the same with the built-in terminal from VS Code. And I never used the Linux Subsystems before, no. |
I've tested the same version of npm and node, but I can't reproduce the problem. Could you tell me what version of npx you are using?
Also, do you see any other messages immediately after executing the command? |
Npx version is 8.5.0 as well. And no, just to run a new command. Also interesting, because I just tested on my laptop, a Lenovo IdeaPad Y910, just installed Node.js on it: And it works just fine, for any terminal. I might try downgrading to npm 8.3.1 and see. If not, I wanted to re-install Windows anyways, maybe that could fix it. Same results with npm/npx 8.3.1
|
I'll describe the method I came up with. I've listed them in order of least impact on the computer environment. Clear npx cache
Uninstall local @wordpress/create-block packageThis may be due to the fact that it is installed globally by npm. Reinstall node.jsPlease note that this may affect your existing local projects. |
Thank you, this seems to have fixed the issue. And my other projects work just fine as well :) Could have this been caused by me trying the newest version of the "current" nodejs? 17.5.0 and then reverting to the stable one? And maybe leaving a corrupted cache or something? |
@andornagy |
Description
Every time I try to run
npx @wordpress/create-block boilerplate
I get the following error:
I have node.js version 16.14.0 and npm version 8.5.0.
All other npm commands work just fine. same with the
npx create-react-app my-app
Step-by-step reproduction instructions
Environment info
Node.js version 16.14.0
Npm version 8.5.0.
Windows 10 PRO version 21h2
LocalWP version 6.2.1+5711
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
The text was updated successfully, but these errors were encountered: