-
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
JS/CSS files in create-block
are not be built
#38343
Comments
This is very helpful. Thank you for testing previous versions. It’s very helpful 👍 |
I encountered with same issue: when i use the "npx @wordpress/create-block some-block" the block is being created but webpack not emitting the scss and js files, only emtting the block.json file. So my block is not working. Is there a solution for that issue, pls? (I use, node v17.4.0, webpack v8.4.0) I also tried the solution above but it did not work for me. |
I have encountered the exact same symptoms. I think this is a problem specific to the Windows OS. It occurs on the Windows host OS, but is not reproduced on WSL which is a Linux environment.
I haven't been able to fully investigate what changes were made between v19 and v20, but I'll check it out. |
Same issue over in #38357 (using wordpress/scripts), and definitely not isolated to just the Windows OS environment. |
I have just landed #38348 which resolves the issues for Windows OS. I plan to publish it to npm later today. |
There are probably two different issues, but I can keep this one open until both are addressed. |
I published a new version v20.0.2 of |
Description
I followed the steps on WordPress site's Create a Block Tutorial page to create a plugin.
I installed the
@wordpress/create-block
package (v2.8.0, the lastest version) and found that there's only one file,project-folder/build/block.json
, in thebuild
folder, other files likeindex.js
,index.css
are not be built after I runnpm run build
ornpm start
on project folder.I have tried these versions, but the problem are still there:
So I tried to install
create-block
v2.7.0 & v2.7.2-next.33ec3857e2.0, and found the problem is solved in these versions.In these versions, the path of
block.json
isproject-folder/block.json
and all JS/CSS files are inproject-folder/build/
correctly.Step-by-step reproduction instructions
Use lastest version:
npx @wordpress/create-block project-folder
to install the packagecd project-folder
andnpm start
project-folder/src/index.js
and the built file are not be shown inproject-folder/build
Use old version:
npx @wordpress/[email protected] project-folder-2
to install the old packagecd project-folder-2
andnpm start
project-folder-2/src/index.js
and all the built files are shown inproject-folder-2/build
Screenshots, screen recording, code snippet
No response
Environment info
Tried nodejs/npm version:
Tried
@wordpress/create-block
version: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: