Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to downgrade this node.js module to specific version and prevent automatic upgrade later?

I am using node.js Nodemailer module and encountered the following error;

[Error: Unsupported configuration, downgrade Nodemailer to v0.7.1 or see the migration guide https://github.com/andris9/Nodemailer#migration-guide]

I looked at my package.json and realize that it is "nodemailer": "^1.8.0", version.

How do I downgrade to v0.7.1 and prevent automatic upgrade later when I run npm update?

like image 431
guagay_wk Avatar asked Nov 08 '15 05:11

guagay_wk


1 Answers

If you need exactly v0.7.1, use "nodemailer": "0.7.1", delete nodemailer under node_modules and run npm install again.

Another way to do this is to run the command:

npm remove nodemailer
npm install [email protected] --save
like image 109
David Xu Avatar answered Nov 04 '22 09:11

David Xu