node-red-contrib-uuid is a Node-RED node designed for the simple and fast generation of RFC4122 compliant Universally Unique Identifiers (UUIDs) within Node-RED flows. It leverages the robust `uuid` npm package internally to ensure standard-compliant and cryptographically strong UUIDs. As of version 0.0.4-rc-1, it is in a release candidate stage, indicating active development and refinement. Node-RED contrib nodes typically follow an independent release cadence, often tied to feature enhancements or updates in their underlying dependencies like the `uuid` library. Its primary differentiator is providing a drag-and-drop solution for UUID generation directly within the Node-RED visual programming environment, abstracting the complexities of the underlying `uuid` library for flow developers.
npm install node-red-contrib-uuidVerified import paths — ran on the pinned version, not inferred.
This Node-RED flow demonstrates basic UUID generation. It uses an Inject node to trigger the UUID node, which then generates a Version 4 UUID and outputs it to the debug sidebar.
Node-RED users: Ensure your Node-RED instance uses a supported Node.js version. Node-RED developers/maintainers: Regularly update the `uuid` dependency to its latest stable version, carefully reviewing its changelog for breaking changes and adapting import/usage patterns if necessary, especially regarding ESM and CJS compatibility for Node-RED's runtime.
Ensure `node-red-contrib-uuid` (or any custom Function node code using `uuid`) depends on `uuid` version 7 or higher. Check the `node-red-contrib-uuid`'s `package.json` for its `uuid` dependency version or update Node-RED and its modules to ensure modern, secure UUID generation.
After installing (`npm install node-red-contrib-uuid` in your Node-RED user directory, typically `~/.node-red`), always restart your Node-RED instance. If the issue persists, check the Node-RED startup logs for errors related to the node or run `npm audit` in your Node-RED user directory to identify dependency problems.
Navigate to your Node-RED user directory (usually `~/.node-red`) and run `npm install node-red-contrib-uuid`. Then restart your Node-RED instance (e.g., `node-red-restart` or `pm2 restart node-red`).
While `node-red-contrib-uuid` maintains its own dependencies, this warning suggests its internal `uuid` version might be old. Monitor for updates to `node-red-contrib-uuid`. If the warning persists and you're using `uuid` directly in a Function node, update your `uuid` dependency to `@latest` (version 7 or higher) in your Node-RED `package.json` and ensure it's accessible.
In the Function node's 'Setup' tab, add 'uuid' as a module (e.g., 'uuidv4' for the variable name, 'uuid' for the module name). Then in your function code, you can use `const { v4: uuidv4 } = global.get('uuidv4')` or simply `const uuidv4 = require('uuid').v4;` if configured via `settings.js`.