Skip to content

test: pin node-opcua to 2.181.0 in test-80 - #308

Merged
robertsLando merged 1 commit into
mainfrom
test/pin-node-opcua
Sep 28, 2026
Merged

robertsLando merged 1 commit into
mainfrom
test/pin-node-opcua

Conversation

@robertsLando

Copy link
Copy Markdown
Member

Problem

test-80-compression-node-opcua fails test_host on ubuntu (Node 22 and 24) for every PR based on current main (e.g. #300, #307):

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at constructNodesetFilename (.../node-opcua-nodesets/dist/nodeset_nodejs.js)

The test's package.json used ^2.36.0, so CI now installs node-opcua 2.186.x. Starting with 2.184.0, node-opcua ships ESM ("type": "module") and uses import.meta.dirname. The test bundles it with esbuild into CJS, where that value becomes undefined. This is an upstream change, not a pkg bug.

Fix

Pin node-opcua-address-space and node-opcua-nodesets to 2.181.0, and add a comment in main.js that explains why and when the pin can be removed.

This is the same change as in #296, split out so it can land first. #296's CI passes test_host on all 6 OS/Node combinations with this pin.

node-opcua 2.184.0 ships ESM and uses import.meta.dirname. The test's
esbuild CJS bundle turns that into undefined, so node-opcua-nodesets
calls path.join(undefined) at startup and test_host fails on every PR.
@robertsLando
robertsLando merged commit 36f18af into main Sep 28, 2026
28 checks passed
@robertsLando
robertsLando deleted the test/pin-node-opcua branch September 28, 2026 14:51
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