The `node-opcua-client-proxy` package is a specialized module within the comprehensive `node-opcua` pure Node.js OPC UA SDK, currently at version 2.169.0. It provides functionalities for creating client-side proxies to interact with OPC UA servers, facilitating streamlined machine-to-machine (M2M) and Internet of Things (IoT) communication patterns. The `node-opcua` project maintains an active release cadence, with frequent updates focusing on stability, performance, and OPC UA specification compliance (e.g., full support for OPC UA 1.05 subtyped structures and unions). Recent releases have introduced features like advertised endpoints for Docker/NAT deployments and a global method-call interceptor API, alongside significant internal migrations from older libraries (`async`/`lodash`) to native modern JavaScript. Key differentiators include its robust TypeScript support, comprehensive certificate management capabilities, and continuous optimization for memory and throughput, particularly in its secure channel and transport layers. This specific module is designed to provide a structured and potentially higher-level abstraction for client interactions with the OPC UA address space, simplifying common operations.
npm install node-opcua-client-proxyVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to establish a connection to an OPC UA server, create a client session, and perform a basic read operation on a variable. It shows the setup of the `OPCUAClient`, session creation, and how `ClientProxy` might be instantiated, along with error handling and graceful disconnection. Remember to set `OPCUA_ENDPOINT_URL`, `OPCUA_USERNAME`, and `OPCUA_PASSWORD` environment variables.
Review any custom client implementations or extensions that might have implicitly relied on `async`/`lodash` internals. Refactor code to use standard ES features (e.g., `Promise`, `Array.prototype` methods). Ensure no internal typings from these deprecated libraries are still being used.
Ensure client-side certificate trust list management is up-to-date and correctly configured to process certificate chains. Consult the `node-opcua-pki` documentation for the latest certificate management APIs if building custom certificate handling solutions. Always test certificate-based connections thoroughly after upgrading.
Monitor resource usage (CPU, memory) and connection/data throughput in production environments after upgrading. Review any custom transport layer parameters, buffer management, or memory allocation strategies if unexpected behavior or resource issues arise.
Clients consuming `historyRead` results, especially for complex data types or those containing `ExtensionObject`s, must verify their data parsing logic to correctly handle the now-promoted `ExtensionObject` structures. Update any casting or type-checking logic as necessary.
To resolve this, you must configure the client's `clientCertificateManager` to explicitly trust the server's certificate. For development, you might temporarily set security mode to `None`, but this is not recommended for production environments.
Verify that the `endpointUrl` is exact and corresponds to one advertised by the server. Use `OPCUAClient.getEndpoints()` to programmatically inspect available server endpoints and ensure your client's security settings (mode, policy) match a supported configuration.
Ensure you are using ES Module `import` syntax (`import { OPCUAClient } from 'node-opcua';`) and that your Node.js project is configured to run ES Modules (e.g., by adding `"type": "module"` to your `package.json` or using `.mjs` file extensions).No dependency data recorded yet.