0

in my Enide-project 'myproj' I am using some local node_modules. I want to refresh one of these node_modules after the developer informed me, that he solved an issue. I thought, I need to call npm update and all will be fine. Anyway the module was not updated, I was able to verify this, because I had a console.log-statement in my code which was not part of the official module.

I tried to call npm remove followed from npm install. The result was the same?! How can npm remember my own code?

Afterwards I deleted the folder in windows explorer, went to github, downloaded and extracted the module in my local node_modules-folder. This worked, but after running my main.js-file there was an error occuring, that some auto-generated modules are missing and there are some dependancy issues. Long story short: I called npm update to solve the dependancy problem and npm install to start the generation procedures. Then, I was able to run my program, but surprisingly I was facing my old version of my own code with my console.log-statement. What went wrong?

How to switch to a newer version of one existing node.js-module?

Jochen
  • 1,746
  • 4
  • 22
  • 48
  • Please give us some more information: Which "module" are you talking about in which version? Also mabye post the contents of your package.json file - i assume the problem lays that inside of there the wrong Version Number is specified. – David Losert Mar 12 '15 at 11:37
  • https://github.com/node-opcua/node-opcua , current version is 0.0.41. – Jochen Mar 12 '15 at 11:39
  • And what does your package.json say? – David Losert Mar 12 '15 at 12:38
  • Have a look at http://stackoverflow.com/questions/16073603/how-do-i-update-each-dependency-in-package-json-to-the-latest-version/22849716#22849716 – Etienne Mar 12 '15 at 19:27

0 Answers0