Visual Studio 2017 External Tools npm Not working

前端 未结 6 1769
猫巷女王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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-14 15:53

    The external web tools configuration is only used when building. The PATH variable is (re-)set using the $(ExternalToolsPath) parameter by one of the build tasks which is: a semi-colon concatenated value of the external web tools list.

    Since you are running the command in the PowerShell Console window, your external web tools configuration is not used.

    My best assumption is that you've got multiple directories in your PATH environment variable that has the npm executable. The latest directory will always win. If this is the case, either remove the duplicate ones or make sure that the directory where your latest version of npm is added last. You can do this from the system properties or from the Nuget profile used by the PowerShell Console window.

    To check your PATH variable in PowerShell use: Write-Host $ENV:Path

    To list the possible locations of the npm executable from PowerShell use: cmd /c where npm

提交回复
热议问题