-
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
Getting An Error When Compiling Scripts using wp-scripts #64446
Comments
@LaTableRouge Thank you for report, but your package.json link is 404 now. Your repo seems to update now. If you clear your issue, please tell us. Or not, please tell your package.json file. |
@miminari I'm sorry I forgot that Github doesn’t handle links redirection.... |
I made a separated branch with the error. It's more clean that way. I've edited the first message in this thread to redirect the links to the branch. :) |
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. |
I did reply and gave more informations. |
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. |
I did reply and gave more informations. |
Hi, thank you for sharing. Stepsnpx @wordpress/create-block test-block-bug
cd test-block-bug
block01/block.json "name": "create-block/test-block-bug",
"title": "Test Block Bug 01", block02/block.json "name": "create-block/test-block-bug2",
"title": "Test Block Bug 02",
register_block_type(__DIR__ . '/build/block01/');
register_block_type(__DIR__ . '/build/block02/');
npm install recharts
import { LineChart, Line, CartesianGrid, XAxis, YAxis } from "recharts";
const data = [{ name: "Page A", uv: 400, pv: 2400, amt: 2400 }];
export default function Edit() {
return (
<LineChart width={600} height={300} data={data}>
<Line type="monotone" dataKey="uv" stroke="#8884d8" />
<CartesianGrid stroke="#ccc" />
<XAxis dataKey="name" />
<YAxis />
</LineChart>
);
} As the docs explained like blew, you might not need to change the build command for building multiple block not customizing the dir. I did the test by I'm sorry that I don't know about the leaflet package very well, you might be better to ask about it in the package repo. |
Thanks a lot for your time. Thanks again for your time |
Hello,
I'm currently writing a plugin with multiple react blocks inside.
Environment info
Description
Here's how it's organized :

For all thoses blocks I use the command:
wp-scripts build --webpack-src-dir=blocks/src --output-path=blocks/build
The blocks are registered like so: https://github.com/LaTableRouge/Mappps/blob/experimental/blockcohabitation/includes/blocks/blocks-register.php
Some blocks are using the same leaflet package (this one)
When there was only one block using this package, everything went fine. But as soon as there was two of them using it, I went through an error. If I compile only one block that use this package it works (doesn't matter which one).
Here's the error:
I don't know if it's a problem from the package in itself, but it seems unlikely. My hypothesis is that is from a lack of scoping from the
wp-scripts
I found theses issues that seems to have the same problem, but without success for my problem:
I'm a bit stuck and I didn't found where to put this issue haha.
The text was updated successfully, but these errors were encountered: