Skip to content

Enhance npm command execution with env parameter - #5782

Open
MaddipatlaChetan24 wants to merge 2 commits into
plotly:mainfrom
MaddipatlaChetan24:patch-1
Open

MaddipatlaChetan24 wants to merge 2 commits into
plotly:mainfrom
MaddipatlaChetan24:patch-1

Conversation

@MaddipatlaChetan24

@MaddipatlaChetan24 MaddipatlaChetan24 commented Sep 29, 2026 •

Copy link
Copy Markdown

Added environment variable support to npm commands.

Guidelines

Added environment variable support to npm commands.
@MaddipatlaChetan24

Copy link
Copy Markdown
Author

please check this!! and this is the first time contributing to this repo!!

@camdecoster

Copy link
Copy Markdown
Contributor

Hello! Could you please provide an explanation as to why this change is needed?

@MaddipatlaChetan24

Copy link
Copy Markdown
Author

Hi, thanks for taking a look. In install_js_deps, env is built with node_modules/.bin prepended to PATH (env["PATH"] = NPM_PATH), but it was never passed to the npm check_call calls, so that PATH change had no effect. This PR passes env=env to the three npm calls (install, install of the local plotly.js archive, and run build), so the PATH setup that's already in the function is actually used. It's only a 3-line change and nothing else is affected.

I haven't verified that it fixes a specific build failure, so if you'd rather not touch this, I'm happy to close it. Otherwise I can merge the latest main and rebase if needed.

This branch has not been deployed

No deployments
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.

2 participants