Skip to content

[Bug] Component generation needs double quote extract_path#3621

Open
antonymilne wants to merge 4 commits into
plotly:devfrom
antonymilne:dev
Open

[Bug] Component generation needs double quote extract_path#3621
antonymilne wants to merge 4 commits into
plotly:devfrom
antonymilne:dev

Conversation

@antonymilne

Copy link
Copy Markdown

Currently when the path to extract-meta.js contains a space, the node command run during component generation crashes with an error like this:

> dash-generate-components ./src/ts/components vizro_dash_components -p package-info.json  --ignore \.test\.

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module '/Users/antony_milne/Library/Application'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Error generating metadata in vizro_dash_components (status=1)

Note the path should be "Application Support/..." but it got cut off. Now with the quote marks it should all work nicely 🎉

@T4rk1n

T4rk1n commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

But now it fails on windows, it seems like the extract path is collated with the previous argument:
'C:\Users\circleci\dash\components\dash-html-components\"C:\Users\circleci\dash\dash\extract-meta.js"'

Maybe we could not use the shlex.split and pass the command argument like ["node", extract_path, ignore, reserved_pattern, component_source].

Replace shlex.split with direct list arguments and remove shell=True
to avoid quoting issues on Windows.
@antonymilne

Copy link
Copy Markdown
Author

Ah yes, good spot @T4rk1n, thanks for that! Let's see if 2f90b0e fixes it.

@camdecoster camdecoster requested a review from KoolADE85 as a code owner March 26, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants