Making Global NPM packages available to all users on windows 2012 server

后端 未结 3 913
情书的邮戳
情书的邮戳 2020-12-14 15:53

I am trying to install continues integration server. This server will pull data from GIT and it will try to build the application. Since I am using windows 2012 server, mult

3条回答
  •  遥遥无期
    2020-12-14 16:48

    Had the same issue. Needed the CI build agent to run a global package on the CLI. Saw this post in a new feature request for system-wide npm -g for Windows.

    In short:

    1. Open an administrator level command prompt
    2. Note the current global prefix: npm prefix -g
    3. Set the global prefix to the CI user: npm config set prefix
    4. Install the needed packages: npm i -g PKG
    5. Restore the prefix to the previous value.

提交回复
热议问题