felixrieseberg / npm-windows-upgrade

:rocket: Upgrade npm on Windows
MIT License
2.53k stars 149 forks source link

Error Launching npm-windows-upgrade #41

Closed gregoryagu closed 7 years ago

gregoryagu commented 8 years ago

I am following the instructions for upgrading NPM using npm-windows-upgrade.

The upgrade tool installs successfully, then I run npm-windows-upgrade.

PS C:\Users\Gregg> npm-windows-upgrade npm-windows-upgrade 0.4.6 ? This tool will upgrade npm. Do you want to continue? Yes events.js:85 throw er; // Unhandled 'error' event ^ Error: spawn powershell.exe ENOENT at exports._errnoException (util.js:746:11) at Process.ChildProcess._handle.onexit (child_process.js:1053:32) at child_process.js:1144:20 at process._tickCallback (node.js:355:11)

I tried this with passing the path to the nodejs folder, and the result was the same.

This is being run on a Windows 7 Professional, Service Pack 1 64 bit box.

I ran this successfully on another machine which is a 2008R2 Server.

Greg

tnguven commented 8 years ago

+1

felixrieseberg commented 8 years ago

Hey, thanks for reporting! I'm wondering if I just introduced a bug - could you do me a favor and try runnig npm install -g npm-windows-upgrade@0.4.4?

gregoryagu commented 8 years ago

Ok, so I did npm install of 0.4.4 and ran it, but the error message is exactly the same.

PS C:\Users\Gregg> npm-windows-upgrade npm-windows-upgrade 0.4.4 ? This tool will upgrade npm. Do you want to continue? Yes events.js:85 throw er; // Unhandled 'error' event ^ Error: spawn powershell.exe ENOENT at exports._errnoException (util.js:746:11) at Process.ChildProcess._handle.onexit (child_process.js:1053:32) at child_process.js:1144:20 at process._tickCallback (node.js:355:11)

felixrieseberg commented 8 years ago

While I'm sorry that you're still having trouble, I'm happy that we're not looking at a regression. Would you mind telling me your versions of npm and Node - and also how you installed them initially?

gregoryagu commented 8 years ago

npm: 2.11.3 Installed through the usual installer. Nothing special.

Node: 0.7.12 Also installed through the usual installer. Nothing special.

I tried running it again just to see if it would work, but the result was the same.

powpow12 commented 8 years ago

running into same issue with windows 8.1, also confirmed with version 0.4.4

npm-windows-upgrade error

PS C:\Users\User\Documents\repos\usda> npm-windows-upgrade --npm-path:"C:\Program Files\nodejs"
npm-windows-upgrade 0.4.6
? This tool will upgrade npm. Do you want to continue? (Y/n) Y
? This tool will upgrade npm. Do you want to continue? Yes
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: spawn powershell.exe ENOENT
    at exports._errnoException (util.js:874:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at doNTCallback2 (node.js:439:9)
    at process._tickCallback (node.js:353:17)

npm version

PS C:\Users\User\Documents\repos\usda> npm version
{ npm: '3.3.8',
  ares: '1.10.1-DEV',
  http_parser: '2.5.0',
  icu: '56.1',
  modules: '46',
  node: '4.2.1',
  openssl: '1.0.2d',
  uv: '1.7.5',
  v8: '4.5.103.35',
  zlib: '1.2.8' }
flpms commented 8 years ago

Same problem on Windows 7.

When I run on PowerShell I receive this:

      throw er; // Unhandled 'error' event
      ^

Error: spawn powershell.exe ENOENT
    at exports._errnoException (util.js:874:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at doNTCallback2 (node.js:439:9)
    at process._tickCallback (node.js:353:17)

And when I run with a MINGW64 receive a different error (I will past all stack to help)

            throw err;
            ^

SyntaxError: Invalid regular expression: /.{1,0}/: numbers out of order in {} quantifier.
    at RegExp (native)
    at new RegExp (C:\Users\myuser\AppData\Roaming\npm\node_modules\npm-windows-upgrade\node_modules\babel\node_modules\babel-core\node_modules\core-js\modules\es6.regexp.constructor.js:23:11)
    at breakLines (C:\Users\myuser\AppData\Roaming\npm\node_modules\npm-windows-upgrade\node_modules\inquirer\lib\utils\screen-manager.js:108:15)
    at ScreenManager.render (C:\Users\myuser\AppData\Roaming\npm\node_modules\npm-windows-upgrade\node_modules\inquirer\lib\utils\screen-manager.js:55:22)
    at Prompt.render (C:\Users\myuser\AppData\Roaming\npm\node_modules\npm-windows-upgrade\node_modules\inquirer\lib\prompts\confirm.js:85:15)
    at Prompt.onKeypress (C:\Users\myuser\AppData\Roaming\npm\node_modules\npm-windows-upgrade\node_modules\inquirer\lib\prompts\confirm.js:109:10)
    at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.next (C:\Users\myuser\AppData\Roaming\npm\node_modules\npm-windows-upgrade\node_modules\inquirer\node_modules\rx-lite\rx.lite.js:1535:12)
    at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (C:\Users\myuser\AppData\Roaming\npm\node_modules\npm-windows-upgrade\node_modules\inquirer\node_modules\rx-lite\rx.lite.js:1469:31)
    at AnonymousObserver.tryCatcher (C:\Users\myuser\AppData\Roaming\npm\node_modules\npm-windows-upgrade\node_modules\inquirer\node_modules\rx-lite\rx.lite.js:63:31)
    at AutoDetachObserverPrototype.next (C:\Users\myuser\AppData\Roaming\npm\node_modules\npm-windows-upgrade\node_modules\inquirer\node_modules\rx-lite\rx.lite.js:5782:51)
felixrieseberg commented 8 years ago

Thank you all for your detailed reports. According to the errors, Node has trouble launching PowerShell - which really shouldn't be an issue, which is why I'm having a hard time figuring out what's wrong here.

I released a new version (0.4.7) that sadly won't fix your issue, but it will tell us what is actually wrong by printing the "unhandled error".

I would be extremely thankful if one of you could give it a try - I'd love to fix this issue for all of you and your console output will be key to figuring out what's wrong.

powpow12 commented 8 years ago

here you go

PS C:\Users\User\Documents\repos\ocd-housing-waitlist> npm install -g npm-windows-upgrade@0.4.7
npm WARN install Couldn't install optional dependency: Unsupported
C:\Program Files\nodejs\npm-windows-upgrade -> C:\Program Files\nodejs\node_modules\npm-windows-upgrade\bin\npm-windows-
upgrade
C:\Program Files\nodejs
└─┬ npm-windows-upgrade@0.4.7
  ├─┬ babel@5.8.23
  │ ├─┬ babel-core@5.8.25
  │ │ ├── babel-plugin-constant-folding@1.0.1
  │ │ ├── babel-plugin-dead-code-elimination@1.0.2
  │ │ ├── babel-plugin-eval@1.0.1
  │ │ ├── babel-plugin-inline-environment-variables@1.0.1
  │ │ ├── babel-plugin-jscript@1.0.4
  │ │ ├── babel-plugin-member-expression-literals@1.0.1
  │ │ ├── babel-plugin-property-literals@1.0.1
  │ │ ├── babel-plugin-proto-to-assign@1.0.4
  │ │ ├── babel-plugin-react-constant-elements@1.0.3
  │ │ ├── babel-plugin-react-display-name@1.0.3
  │ │ ├── babel-plugin-remove-console@1.0.1
  │ │ ├── babel-plugin-remove-debugger@1.0.1
  │ │ ├── babel-plugin-runtime@1.0.7
  │ │ ├─┬ babel-plugin-undeclared-variables-check@1.0.2
  │ │ │ └── leven@1.0.2
  │ │ ├── babel-plugin-undefined-to-void@1.1.6
  │ │ ├── babylon@5.8.23
  │ │ ├── bluebird@2.10.2
  │ │ ├── core-js@1.2.2
  │ │ ├─┬ debug@2.2.0
  │ │ │ └── ms@0.7.1
  │ │ ├─┬ detect-indent@3.0.1
  │ │ │ ├── get-stdin@4.0.1
  │ │ │ └── minimist@1.2.0
  │ │ ├── esutils@2.0.2
  │ │ ├── globals@6.4.1
  │ │ ├─┬ home-or-tmp@1.0.0
  │ │ │ ├── os-tmpdir@1.0.1
  │ │ │ └── user-home@1.1.1
  │ │ ├─┬ is-integer@1.0.6
  │ │ │ └── is-finite@1.0.1
  │ │ ├── js-tokens@1.0.1
  │ │ ├── json5@0.4.0
  │ │ ├─┬ line-numbers@0.2.0
  │ │ │ └── left-pad@0.0.3
  │ │ ├── minimatch@2.0.10
  │ │ ├── private@0.1.6
  │ │ ├─┬ regenerator@0.8.35
  │ │ │ ├─┬ commoner@0.10.3
  │ │ │ │ ├── commander@2.5.1
  │ │ │ │ ├─┬ glob@4.2.2
  │ │ │ │ │ └─┬ minimatch@1.0.0
  │ │ │ │ │   ├── lru-cache@2.7.0
  │ │ │ │ │   └── sigmund@1.0.1
  │ │ │ │ ├── graceful-fs@3.0.8
  │ │ │ │ ├── iconv-lite@0.4.13
  │ │ │ │ ├── install@0.1.8
  │ │ │ │ └── q@1.1.2
  │ │ │ ├─┬ defs@1.1.1
  │ │ │ │ ├─┬ alter@0.2.0
  │ │ │ │ │ └── stable@0.1.5
  │ │ │ │ ├── ast-traverse@0.1.1
  │ │ │ │ ├── breakable@1.0.0
  │ │ │ │ ├── esprima-fb@15001.1001.0-dev-harmony-fb
  │ │ │ │ ├── simple-fmt@0.1.0
  │ │ │ │ ├── simple-is@0.2.0
  │ │ │ │ ├── stringmap@0.2.2
  │ │ │ │ ├── stringset@0.2.1
  │ │ │ │ ├── tryor@0.1.2
  │ │ │ │ └─┬ yargs@3.27.0
  │ │ │ │   ├── camelcase@1.2.1
  │ │ │ │   ├─┬ cliui@2.1.0
  │ │ │ │   │ ├─┬ center-align@0.1.1
  │ │ │ │   │ │ └─┬ align-text@0.1.3
  │ │ │ │   │ │   ├─┬ kind-of@2.0.1
  │ │ │ │   │ │   │ └── is-buffer@1.1.0
  │ │ │ │   │ │   └── longest@1.0.1
  │ │ │ │   │ ├── right-align@0.1.3
  │ │ │ │   │ └── wordwrap@0.0.2
  │ │ │ │   ├── decamelize@1.0.0
  │ │ │ │   ├─┬ os-locale@1.4.0
  │ │ │ │   │ └─┬ lcid@1.0.0
  │ │ │ │   │   └── invert-kv@1.0.0
  │ │ │ │   ├── window-size@0.1.2
  │ │ │ │   └── y18n@3.2.0
  │ │ │ ├── esprima-fb@15001.1.0-dev-harmony-fb
  │ │ │ └─┬ recast@0.10.24
  │ │ │   └── ast-types@0.8.5
  │ │ ├─┬ regexpu@1.3.0
  │ │ │ ├── esprima@2.6.0
  │ │ │ ├── regenerate@1.2.1
  │ │ │ ├── regjsgen@0.2.0
  │ │ │ └─┬ regjsparser@0.1.5
  │ │ │   └── jsesc@0.5.0
  │ │ ├── repeating@1.1.3
  │ │ ├── resolve@1.1.6
  │ │ ├── shebang-regex@1.0.0
  │ │ ├─┬ source-map-support@0.2.10
  │ │ │ └── source-map@0.1.32
  │ │ ├── to-fast-properties@1.0.1
  │ │ ├── trim-right@1.0.1
  │ │ └── try-resolve@1.0.1
  │ ├─┬ chokidar@1.2.0
  │ │ ├─┬ anymatch@1.3.0
  │ │ │ └─┬ micromatch@2.2.0
  │ │ │   ├─┬ arr-diff@1.1.0
  │ │ │   │ ├── arr-flatten@1.0.1
  │ │ │   │ └── array-slice@0.2.3
  │ │ │   ├── array-unique@0.2.1
  │ │ │   ├─┬ braces@1.8.2
  │ │ │   │ ├─┬ expand-range@1.8.1
  │ │ │   │ │ └─┬ fill-range@2.2.2
  │ │ │   │ │   ├── is-number@1.1.2
  │ │ │   │ │   ├─┬ randomatic@1.1.0
  │ │ │   │ │   │ └── kind-of@1.1.0
  │ │ │   │ │   └── repeat-string@1.5.2
  │ │ │   │ ├── lazy-cache@0.2.3
  │ │ │   │ ├── preserve@0.2.0
  │ │ │   │ └── repeat-element@1.1.2
  │ │ │   ├── expand-brackets@0.1.4
  │ │ │   ├─┬ extglob@0.3.1
  │ │ │   │ ├─┬ ansi-green@0.1.1
  │ │ │   │ │ └── ansi-wrap@0.1.0
  │ │ │   │ └── success-symbol@0.1.0
  │ │ │   ├── filename-regex@2.0.0
  │ │ │   ├── is-glob@1.1.3
  │ │ │   ├── kind-of@1.1.0
  │ │ │   ├─┬ object.omit@1.1.0
  │ │ │   │ ├─┬ for-own@0.1.3
  │ │ │   │ │ └── for-in@0.1.4
  │ │ │   │ └── isobject@1.0.2
  │ │ │   ├─┬ parse-glob@3.0.4
  │ │ │   │ ├── glob-base@0.3.0
  │ │ │   │ └── is-dotfile@1.0.2
  │ │ │   └─┬ regex-cache@0.4.2
  │ │ │     ├── is-equal-shallow@0.1.3
  │ │ │     └── is-primitive@2.0.0
  │ │ ├── arrify@1.0.0
  │ │ ├── async-each@0.1.6
  │ │ ├── glob-parent@2.0.0
  │ │ ├─┬ is-binary-path@1.0.1
  │ │ │ └── binary-extensions@1.3.1
  │ │ ├─┬ is-glob@2.0.1
  │ │ │ └── is-extglob@1.0.0
  │ │ ├─┬ lodash.flatten@3.0.2
  │ │ │ ├─┬ lodash._baseflatten@3.1.4
  │ │ │ │ ├── lodash.isarguments@3.0.4
  │ │ │ │ └── lodash.isarray@3.0.4
  │ │ │ └── lodash._isiterateecall@3.0.9
  │ │ └─┬ readdirp@2.0.0
  │ │   ├── graceful-fs@4.1.2
  │ │   └─┬ readable-stream@2.0.2
  │ │     ├── core-util-is@1.0.1
  │ │     ├── isarray@0.0.1
  │ │     ├── process-nextick-args@1.0.3
  │ │     ├── string_decoder@0.10.31
  │ │     └── util-deprecate@1.0.2
  │ ├─┬ commander@2.9.0
  │ │ └── graceful-readlink@1.0.1
  │ ├── convert-source-map@1.1.1
  │ ├── fs-readdir-recursive@0.1.2
  │ ├─┬ output-file-sync@1.1.1
  │ │ ├─┬ mkdirp@0.5.1
  │ │ │ └── minimist@0.0.8
  │ │ └── xtend@4.0.0
  │ ├── path-exists@1.0.0
  │ ├── slash@1.0.0
  │ └─┬ source-map@0.4.4
  │   └── amdefine@1.0.0
  └── rsvp@3.1.0

PS C:\Users\User\Documents\repos\ocd-housing-waitlist> npm version
{ npm: '3.3.8',
  ares: '1.10.1-DEV',
  http_parser: '2.5.0',
  icu: '56.1',
  modules: '46',
  node: '4.2.1',
  openssl: '1.0.2d',
  uv: '1.7.5',
  v8: '4.5.103.35',
  zlib: '1.2.8' }
gregoryagu commented 8 years ago
PS C:\Users\Gregg> npm-windows-upgrade
npm-windows-upgrade 0.4.7
? This tool will upgrade npm. Do you want to continue? Yes
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: spawn powershell.exe ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
    at child_process.js:1144:20
    at process._tickCallback (node.js:355:11)
PS C:\Users\Gregg>

PS C:\Users\Gregg> npm version
{ npm: '2.11.3',
  http_parser: '2.3',
  modules: '14',
  node: '0.12.7',
  openssl: '1.0.1p',
  uv: '1.6.1',
  v8: '3.28.71.19',
  zlib: '1.2.8' }
gregoryagu commented 8 years ago

I don't know if it's any help, but this is the output when installing:

PS C:\Users\Gregg> set-executionPolicy Unrestricted -scope CurrentUser -Force
PS C:\Users\Gregg> npm install -g npm-windows-upgrade@0.4.7
npm WARN optional dep failed, continuing fsevents@1.0.2
C:\Users\Gregg\AppData\Roaming\npm\npm-windows-upgrade -> C:\Users\Gregg\AppData\Roaming\npm\node_modules\npm-windows-up
grade\bin\npm-windows-upgrade
npm WARN unmet dependency C:\Users\Gregg\AppData\Roaming\npm\node_modules\you\node_modules\node-sass requires optimist@'
0.6.x' but will load
npm WARN unmet dependency C:\Users\Gregg\AppData\Roaming\npm\node_modules\you\node_modules\optimist,
npm WARN unmet dependency which is version 0.5.0
npm WARN unmet dependency C:\Users\Gregg\AppData\Roaming\npm\node_modules\you\node_modules\express\node_modules\connect
requires cookie@'0.0.5' but will load
npm WARN unmet dependency C:\Users\Gregg\AppData\Roaming\npm\node_modules\you\node_modules\express\node_modules\cookie,
npm WARN unmet dependency which is version 0.1.0
npm-windows-upgrade@0.4.7 C:\Users\Gregg\AppData\Roaming\npm\node_modules\npm-windows-upgrade
├── cli-spinner@0.2.1
├── chalk@1.1.1 (escape-string-regexp@1.0.3, supports-color@2.0.0, ansi-styles@2.1.0, has-ansi@2.0.0, strip-ansi@3.0.0)
├── rsvp@3.1.0
├── prompt@0.2.14 (revalidator@0.1.8, pkginfo@0.3.1, read@1.0.7, winston@0.8.3, utile@0.2.1)
├── inquirer@0.10.1 (ansi-regex@2.0.0, strip-ansi@3.0.0, figures@1.4.0, ansi-escapes@1.1.0, cli-width@1.1.0, through@2.3
.8, readline2@1.0.1, cli-cursor@1.0.2, run-async@0.1.0, rx-lite@3.1.2, lodash@3.10.1)
└── babel@5.8.23 (slash@1.0.0, path-is-absolute@1.0.0, path-exists@1.0.0, fs-readdir-recursive@0.1.2, convert-source-map
@1.1.1, commander@2.9.0, glob@5.0.15, source-map@0.4.4, output-file-sync@1.1.1, chokidar@1.2.0, lodash@3.10.1, babel-cor
sgutkin commented 8 years ago

On Windows 7 SP1 with Visual Studio 2015. I've tried the same process from both Command Prompt and from Powershell.

PS C:\MyRestEight\src\MyRestEight> npm -v 1.4.9 PS C:\MyRestEight\src\MyRestEight> node -v v0.10.31


From Powershell, I executed : set-executionPolicy Unrestricted -scope CurrentUser -Force

I installed : npm install -g npm-windows-upgrade

C:\MyRestEight\src\MyRestEight>npm-windows-upgrade npm-windows-upgrade 1.2.1 ? This tool will upgrade npm. Do you want to continue? Yes

events.js:72 throw er; // Unhandled 'error' event ^ Error: spawn ENOENT at errnoException (child_process.js:1001:11)

at Process.ChildProcess._handle.onexit (child_process.js:792:34)

C:\MyRestEight\src\MyRestEight>ver

Microsoft Windows [Version 6.1.7601]

Path=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExten sions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7; C:\Program Files (x86)\MSBuild\14.0\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Com mon7\IDE\Extensions\Microsoft\Web Tools\External;C:\Program Files (x86)\Microsof t Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\node;C: \Program Files\Git\cmd;C:\Program Files\Git\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio 14.0\C ommon7\Tools;C:\windows\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86 )\Microsoft Visual Studio 14.0\VC\VCPackages;C:\Program Files (x86)\HTML Help Wo rkshop;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performanc e Tools;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\M icrosoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\;C:\Python27\;C:\Python27\Scr ipts;C:\Program Files (x86)\Support Tools\;c:\Program Files (x86)\Intel\iCLS Cli ent\;c:\Program Files\Intel\iCLS Client\;C:\Users\sgutkin.dnx\runtimes\dnx-clr- win-x86.1.0.0-rc1-update1\bin;C:\Users\sgutkin.dnx\bin;C:\ProgramData\chocolate y\bin

felixrieseberg commented 8 years ago

Hey @sgutkin, I have trouble reproducing your issue (I'm using a blank VM to install your version of Node & npm), and then try to run the upgrade. Works fine for me, so something seems to be unique here - do you remember how you installed Node? I'd love to get to the bottom of this.

sgutkin commented 8 years ago

I simply used the Visual Studio 2015 installation . I am digging in a bit to try to find out if there is anything odd on my end too. My node installation seems to live in a Microsoft proprietary location (see below). I did see that I seem to have a very new folder called "nodenpm". I'm not sure if it is correct. I also find a file "npmrc" in the folder : C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\node\etc. It had an odd mix of forward & backward slashes with one extra . I changed it to all forward slashes : "prefix = C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/Extensions/Microsoft/Web Tools/External/nodenpm"

Directory of C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External

01/19/2016 10:46 AM

. 01/19/2016 10:46 AM .. 11/19/2015 02:35 PM bower 07/28/2015 04:51 PM 64 bower.cmd 12/03/2015 02:46 PM git 07/28/2015 04:51 PM 72 grunt.cmd 11/19/2015 02:35 PM grunt-cli 07/28/2015 04:51 PM 65 jsx.cmd 01/19/2016 10:00 AM node 07/28/2015 04:51 PM 23 node.cmd 01/19/2016 10:19 AM nodenpm 11/19/2015 02:35 PM npm 07/28/2015 04:51 PM 67 npm.cmd 01/19/2016 10:48 AM 1,541 npm-debug.log 11/19/2015 02:37 PM react-server 07/28/2015 04:51 PM 68 react-server.cmd 11/19/2015 02:37 PM react-tools 7 File(s) 1,900 bytes 10 Dir(s) 27,783,499,776 bytes free

On Tue, Jan 19, 2016 at 10:48 AM, Felix Rieseberg notifications@github.com wrote:

Hey @sgutkin https://github.com/sgutkin, I have trouble reproducing your issue (I'm using a blank VM to install your version of Node & npm), and then try to run the upgrade. Works fine for me, so something seems to be unique here - do you remember how you installed Node? I'd love to get to the bottom of this.

— Reply to this email directly or view it on GitHub https://github.com/felixrieseberg/npm-windows-upgrade/issues/41#issuecomment-172948508 .

sgutkin commented 8 years ago

Also:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External>npm root -g

yields:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\nodenpm\node_modules

.. and this folder DOES NOT EXIST. I have "nodenpm" but it is empty. I think my NPM actually lives in

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\npm\node_modules

On Tue, Jan 19, 2016 at 10:55 AM, Seth Gutkin seth.t.gutkin@gmail.com wrote:

I simply used the Visual Studio 2015 installation . I am digging in a bit to try to find out if there is anything odd on my end too. My node installation seems to live in a Microsoft proprietary location (see below). I did see that I seem to have a very new folder called "nodenpm". I'm not sure if it is correct. I also find a file "npmrc" in the folder : C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\node\etc. It had an odd mix of forward & backward slashes with one extra . I changed it to all forward slashes : "prefix = C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/Extensions/Microsoft/Web Tools/External/nodenpm"

Directory of C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External

01/19/2016 10:46 AM

. 01/19/2016 10:46 AM .. 11/19/2015 02:35 PM bower 07/28/2015 04:51 PM 64 bower.cmd 12/03/2015 02:46 PM git 07/28/2015 04:51 PM 72 grunt.cmd 11/19/2015 02:35 PM grunt-cli 07/28/2015 04:51 PM 65 jsx.cmd 01/19/2016 10:00 AM node 07/28/2015 04:51 PM 23 node.cmd 01/19/2016 10:19 AM nodenpm 11/19/2015 02:35 PM npm 07/28/2015 04:51 PM 67 npm.cmd 01/19/2016 10:48 AM 1,541 npm-debug.log 11/19/2015 02:37 PM react-server 07/28/2015 04:51 PM 68 react-server.cmd 11/19/2015 02:37 PM react-tools 7 File(s) 1,900 bytes 10 Dir(s) 27,783,499,776 bytes free

On Tue, Jan 19, 2016 at 10:48 AM, Felix Rieseberg < notifications@github.com> wrote:

Hey @sgutkin https://github.com/sgutkin, I have trouble reproducing your issue (I'm using a blank VM to install your version of Node & npm), and then try to run the upgrade. Works fine for me, so something seems to be unique here - do you remember how you installed Node? I'd love to get to the bottom of this.

— Reply to this email directly or view it on GitHub https://github.com/felixrieseberg/npm-windows-upgrade/issues/41#issuecomment-172948508 .

sgutkin commented 8 years ago

MS Visual Studio Professional 2015 14.0.24720.00 Update 1 with "Node.js Tools" 1.1.31104.02

Microsoft Visual Studio Professional 2015 Version 14.0.24720.00 Update 1 Microsoft .NET Framework Version 4.6.01055

Installed Version: Professional

Visual Basic 2015 00325-60003-25155-AA417 Microsoft Visual Basic 2015

Visual C# 2015 00325-60003-25155-AA417 Microsoft Visual C# 2015

Visual C++ 2015 00325-60003-25155-AA417 Microsoft Visual C++ 2015

Application Insights Tools for Visual Studio Package 1.0 Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015 (RC1 Update 1) 14.1.11120.0 ASP.NET and Web Tools 2015 (RC1 Update 1)

ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0 For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013 5.2.30624.0 For additional information, visit http://www.asp.net/

Azure App Service Tools v2.7.1 14.0.11112.0 Azure App Service Tools v2.7.1

Common Azure Tools 1.6 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio 1.0 A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JetBrains ReSharper Ultimate 2015.2 Build 103.0.20150818.200216 JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2016 JetBrains, Inc.

Microsoft Azure HDInsight HQL Service 2.0.2600.0 Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio 2.0.2600.0 An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools 1.4 Microsoft Azure Mobile Services Tools

Microsoft Azure Tools 2.7 Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.7.30818.1601

Node.js Tools 1.1.31104.02 Adds support for developing and debugging Node.js apps in Visual Studio

Node.js Tools - Profiling 1.1.31104.02 Profiling support for Node.js projects.

NuGet Package Manager 3.3.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer 1.2 Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools 14.0.50730.0 Microsoft SQL Server Data Tools

TypeScript 1.7.6.0 TypeScript for Microsoft Visual Studio

Web Essentials 2015 1.0.203 Adds many useful features to Visual Studio for web developers.

On Tue, Jan 19, 2016 at 10:59 AM, Seth Gutkin seth.t.gutkin@gmail.com wrote:

Also:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External>npm root -g

yields:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\nodenpm\node_modules

.. and this folder DOES NOT EXIST. I have "nodenpm" but it is empty. I think my NPM actually lives in

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\npm\node_modules

On Tue, Jan 19, 2016 at 10:55 AM, Seth Gutkin seth.t.gutkin@gmail.com wrote:

I simply used the Visual Studio 2015 installation . I am digging in a bit to try to find out if there is anything odd on my end too. My node installation seems to live in a Microsoft proprietary location (see below). I did see that I seem to have a very new folder called "nodenpm". I'm not sure if it is correct. I also find a file "npmrc" in the folder : C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\node\etc. It had an odd mix of forward & backward slashes with one extra . I changed it to all forward slashes : "prefix = C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/Extensions/Microsoft/Web Tools/External/nodenpm"

Directory of C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External

01/19/2016 10:46 AM

. 01/19/2016 10:46 AM .. 11/19/2015 02:35 PM bower 07/28/2015 04:51 PM 64 bower.cmd 12/03/2015 02:46 PM git 07/28/2015 04:51 PM 72 grunt.cmd 11/19/2015 02:35 PM grunt-cli 07/28/2015 04:51 PM 65 jsx.cmd 01/19/2016 10:00 AM node 07/28/2015 04:51 PM 23 node.cmd 01/19/2016 10:19 AM nodenpm 11/19/2015 02:35 PM npm 07/28/2015 04:51 PM 67 npm.cmd 01/19/2016 10:48 AM 1,541 npm-debug.log 11/19/2015 02:37 PM react-server 07/28/2015 04:51 PM 68 react-server.cmd 11/19/2015 02:37 PM react-tools 7 File(s) 1,900 bytes 10 Dir(s) 27,783,499,776 bytes free

On Tue, Jan 19, 2016 at 10:48 AM, Felix Rieseberg < notifications@github.com> wrote:

Hey @sgutkin https://github.com/sgutkin, I have trouble reproducing your issue (I'm using a blank VM to install your version of Node & npm), and then try to run the upgrade. Works fine for me, so something seems to be unique here - do you remember how you installed Node? I'd love to get to the bottom of this.

— Reply to this email directly or view it on GitHub https://github.com/felixrieseberg/npm-windows-upgrade/issues/41#issuecomment-172948508 .

felixrieseberg commented 8 years ago

Interesting, thanks for the info. It's very possible that Visual Studio installs/installed Node incorrectly - I'll try to spin up a VM with VS and Node to test this out. Thanks for reporting!

shanehoban commented 8 years ago

While not a solution, this is at least a workaround that worked for me. When trying npm-windows-upgrade on it's own was throwing that error, I tried npm-windows-upgrade -p to skip the initial prompt, which showed me versions but then threw an error.

From there I did npm-windows-upgrade -p --version 3.8.1 and voila, it worked.

I picked the most recent version that displayed when doing the first -p command.

s-limo commented 7 years ago

Please check if your powershell is in PATH. Solution could be run the following command (or update system PATH variable) before running npm-windows-upgrade c:> set path=%path%;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

gurungbinod commented 7 years ago

Thanks @s-limo . It worked with ease!!

gangadharjannu commented 7 years ago

Thanks @s-limo. It is working!

MahmoudMabrok commented 4 years ago

u can check this also https://github.com/felixrieseberg/npm-windows-upgrade/issues/150#issuecomment-544824737

v2nagaraj commented 4 years ago

Please check if your powershell is in PATH. Solution could be run the following command (or update system PATH variable) before running npm-windows-upgrade c:> set path=%path%;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

v2nagaraj commented 4 years ago

excellect its worked for me like jump...