Skip to content

Commit

Permalink
Fixes the parcel2 build for hdf5 viz when using node18. The underlying
Browse files Browse the repository at this point in the history
problem is that parcel passes through, unfiltered, the environment.  We
could have a separate list to figure out which plugins need additional
options, but this runs the risk of deployers having *other* potentially
broken things in their ENV for node.  By telling parcel to just use the
process backend, we avoid this issue completely and don't have to modify
or maintain other changes to the build infra.
  • Loading branch information
dannon committed May 5, 2023
1 parent 3588f55 commit 74732f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ function buildPlugins(callback, forceRebuild) {
};
// if node version is >16, set NODE_OPTIONS to use legacy openssl provider
if (process.versions.node.split(".")[0] > "16") {
opts.env = { ...process.env, NODE_OPTIONS: "--openssl-legacy-provider" };
opts.env = {
...process.env,
PARCEL_WORKER_BACKEND: "process",
NODE_OPTIONS: "--openssl-legacy-provider",
};
}
if (child_process.spawnSync("yarn", ["build"], opts).status === 0) {
console.log(`Successfully built, saving build state to ${hashFilePath}`);
Expand Down

0 comments on commit 74732f7

Please sign in to comment.