Skip to content

fix: update Readme e2e setup to require build:example#166

Open
KapilSachdev wants to merge 1 commit into
apache:gh-pagesfrom
KapilSachdev:fix/readme-e2e-build
Open

fix: update Readme e2e setup to require build:example#166
KapilSachdev wants to merge 1 commit into
apache:gh-pagesfrom
KapilSachdev:fix/readme-e2e-build

Conversation

@KapilSachdev

@KapilSachdev KapilSachdev commented Jun 10, 2026

Copy link
Copy Markdown

E2E Build Prerequisite Clarification

Following Readme instructions for e2e fails with error You need to run node tool/build-example.js before run this test.

Problem

echarts-examples README instructs users to run:

npm run build:examplelist

so that e2e tests can execute without issues using

npm run test:e2e:esbuild:local

However, build:examplelist invokes tool/build-example.js --no-thumb, which skips the Puppeteer-driven screenshot flow.

That also means the option JSON files under public/data/option/*.json are not generated, which invokes below code:

async function buildRunCode() {
const files = await globby([
`${PUBLIC_DIR}/data/option/*.json`,
`${PUBLIC_DIR}/data-gl/option/*.json`
]);
if (!files.length) {
throw new Error(
'You need to run `node tool/build-example.js` before run this test.'
);
}

Solution

  • Update the README for proper e2e setup requiring npm run build:example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant