Visual Studio 2017 External Tools npm Not working

前端 未结 6 1806
猫巷女王i
猫巷女王i 2021-01-14 15:23

I have a typescript project that requires npm 3+. I\'ve install it to C:\\Program Files\\nodesjs, and I set my system environment variables to point there.

In vis

6条回答
  •  無奈伤痛
    2021-01-14 15:36

    The way you add an extra path to the external tools seems correct. Are you sure you have the correct version there ? (On my installation the built-in nodejs version was 5.4.1 and npm verison 3.3.4)

    To be sure, for me the best way to figure out which npm installation Visual Studio 2017 was using is this (taken from How to get the npm global path prefix) :

    PM> npm config get prefix
    

    And if all else fails, you can always update the built-in npm too. Just navigate to your web external path (probably C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Web\External) and :

    pm> npm install npm@latest
    

提交回复
热议问题