How to resolve deprecated node-uuid message

Posted on May 27, 2022

A short guide about the node-uuid deprecated message

When installing npm packages, you might see a warning message that says node-uuid is deprecated.

The message look as follows:

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead

The message appears because the development of the node-uuid package has stopped since 2017.

There’s a new project named uuid which is the successor of node-uuid.

The module node-uuid is still available from npm for backward compatibility purposes.

To resolve the deprecated warning message, you need to replace node-uuid with uuid as shown below:

npm uninstall --save node-uuid
npm install --save uuid

The uuid package should now be added to the dependencies list in your package.json file.

At times, the warning may show up when you install a certain package from npm.

One example is when you install an old version of the cordova package:

$ npm install cordova@3.6.0-0.2.8
# ...
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead

The deprecated warning appears because cordova depends on the node-uuid package.

Only the package maintainers can update the dependency. To resolve the warning, you should look to the Github page of the project and see if there’s a newer package that depends on uuid instead of node-uuid.

At the time of this writing, all actively maintained npm packages should already switch to uuid from node-uuid.

And that’s how you resolve the node-uuid deprecated message.

Level up your programming skills

I'm sending out an occasional email with the latest programming tutorials. Drop your email in the box below and I'll send new stuff straight into your inbox!

No spam. Unsubscribe anytime.