When installing npm packages, you might see a warning message that says node-uuid
is deprecated.
The message look as follows:
npm WARN deprecated [email protected]: 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 [email protected]
# ...
npm WARN deprecated [email protected]: 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.