I have downloaded/installed a node_module (npm package)... I have played around with the internal files to suit my needs inside the node_modules folder. It is the most convenient for me to just use it as a node_module, but I'm worried that the next time I update npm packages it might update and erase all of the changes I have made. What is the best way to make sure only that particular package should not be updated?
Thank you very much
I have downloaded/installed a node_module (npm package)... I have played around with the internal files to suit my needs inside the node_modules folder. It is the most convenient for me to just use it as a node_module, but I'm worried that the next time I update npm packages it might update and erase all of the changes I have made. What is the best way to make sure only that particular package should not be updated?
Thank you very much
Share Improve this question asked Mar 18, 2020 at 2:52 prestonpreston 4,36710 gold badges54 silver badges89 bronze badges 02 Answers
Reset to default 6Make the version of that package specific in package.json file. For example you manually added 3.0.0 version of express in dependencies or devDependencies, change the entry of express as:
"express":"3.0.0"
You can store your own/modified packages either locally (e.g. in a mon place outside of the project) or in the cloud (e.g. GitHub) and then reference the package via the file path or repository URL respectively.
Check here:
local paths
Git URLs as Dependencies
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744729604a4590387.html
评论列表(0条)