Skip to content
This repository has been archived by the owner on Sep 11, 2021. It is now read-only.

Error after upgrade ... but upgrade seems successful #11

Closed
warrenhales opened this issue Jul 7, 2015 · 4 comments
Closed

Error after upgrade ... but upgrade seems successful #11

warrenhales opened this issue Jul 7, 2015 · 4 comments

Comments

@warrenhales
Copy link

@felixrieseberg I just updated to version 0.2.3 of npm-windows-upgrade because I was having the same issue described in issue #10

I then ran it (on Windows 8.1 pro) and got this error message:

PS C:\windows\system32> npm-windows-upgrade
npm-windows-upgrade 0.2.3
? This tool will upgrade npm. Do you want to continue? Yes
? Which version do you want to install? 2.12.1
Upgrading.. \

You wanted to install npm 2.12.1, but the installed version is2.11.2.
Please consider reporting your trouble to http://aka.ms/npm-issues.
Here is the output from the upgrader script:
[ '\r\n',
  '\r\n',
  '    Directory: C:\\Users\\Warren\\AppData\\Local\\Temp\r\n',
  '\r\n',
  '\r\n',
  'Mode                LastWriteTime     Length Name
  \r\n',
  '----                -------------     ------ ----
  \r\n',
  'd----          7/7/2015   1:58 PM            npm_upgrade
  \r\n',
  'npm@2.12.1 node_modules\\npm\n',
  'All done!\r\n',
  '\r\n',
  '\r\n' ] []

But despite the error message, it looks like the upgrade happened:

PS C:\windows\system32> npm list -g --depth=0
C:\Users\Warren\AppData\Roaming\npm
├── bower@1.4.1
├── gulp@3.8.11
├── npm@2.12.1
├── npm-check@3.2.10
└── npm-windows-upgrade@0.2.3

I am new to node and npm so could be just something weird I did to my environment while learning and experimenting but thought I would report it.

@warrenhales
Copy link
Author

Actually ... now I am not sure if the update actually worked. Despite what the list command is reporting (see above) doing npm -v returns 2.11.2

@warrenhales
Copy link
Author

Closed powershell and re-opened and ran npm-windows-upgrade again and received a different error:

PS C:\SolutionTemplates\WebSolution> npm-windows-upgrade
npm-windows-upgrade 0.2.3
? This tool will upgrade npm. Do you want to continue? Yes
? Which version do you want to install? 2.12.1
Upgrading.. /Error:  module.js:338
    throw err;
          ^
Error: Cannot find module 'semver'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (C:\Users\Warren\AppData\Roaming\npm\node_modules\npm\lib\config\defaults.js:7:14)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

Upgrading.. -

You wanted to install npm 2.12.1, but the installed version is2.11.2.
Please consider reporting your trouble to http://aka.ms/npm-issues.
Here is the output from the upgrader script:
[ 'All done!\r\n' ] [ 'module.js:338\r\n    throw err;\r\n          ^\r\nError: Cannot find module \'semver\'\r\n    at
Function.Module._resolveFilename (module.js:336:15)\r\n    at Function.Module._load (module.js:278:25)\r\n    at Module.
require (module.js:365:17)\r\n    at require (module.js:384:17)\r\n    at Object.<anonymous> (C:\\Users\\Warren\\AppData
\\Roaming\\npm\\node_modules\\npm\\lib\\config\\defaults.js:7:14)\r\n    at Module._compile (module.js:460:26)\r\n    at
 Object.Module._extensions..js (module.js:478:10)\r\n    at Module.load (module.js:355:32)\r\n    at Function.Module._lo
ad (module.js:310:12)\r\n    at Module.require (module.js:365:17)\r\n' ]
PS C:\SolutionTemplates\WebSolution>

@warrenhales
Copy link
Author

Just noticed something that may be relevant to this issue:

My node installation is in C:\nodejs

But reading the manual solution it sounds like the assumption is node is installed in

C:\Program Files (x86)\nodejs

@felixrieseberg
Copy link
Owner

Actually, I have hopes that the just released version 0.3.2 will fix your issue. Do me a favour and run npm install -g npm-windows-upgrade and npm-windows-upgrade again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants