Questions tagged [npm-config]

21 questions
183
votes
27 answers

Using npm behind corporate proxy .pac

I need to download several packages through npm but our corporate proxy configuration is a .pac file (i'm on windows) I have already tried npm config set proxy http://mydomain\username:password@1.2.3.4:8181/proxy.pac npm config set https-proxy…
Doc
  • 5,078
  • 6
  • 52
  • 88
23
votes
2 answers

npm config - global vs local

Here are the relevant docs on the subject: https://docs.npmjs.com/cli/config It looks like these are equivalent: npm config set foo bar npm set -g foo bar so I figured that if I run npm set without the -g switch, then it would update my local…
user7898461
15
votes
3 answers

python is not a valid npm option

I am trying to set an older version of python in order to install modules and build an old node project. I run this command: npm config set python=python2.7 OR npm config set python C:\Python27\python.exe In both cases I am getting this error: npm…
reddfox
  • 167
  • 1
  • 1
  • 9
5
votes
2 answers

Setting up username and password for npm registry URL

I am trying to use npm to install a package from url : http://host:80 I did the following: npm config set strict-ssl false npm config set registry "<>" npm --proxy http://host:port install <> (our proxy does not require authentication) When I tired…
Jai
  • 295
  • 2
  • 5
  • 11
4
votes
1 answer

node-gyp `msvs_version` is not a valid npm option

I'm currently trying to develop a Node application that can call C++ functions. I came across people saying that we have to use the node-gyp package. Upon following this setup, when I try to npm config set msvs_version 2017 in my cmd, it gives me…
InvalidHop
  • 104
  • 1
  • 10
2
votes
0 answers

How to concat npm_package_config variable inside the single quotes

In package.json I have following configuration: "scripts": { ... "api:update": "curl -k -H 'Cookie: JSESSIONID=$npm_package_config_session' -o api-docs.json https://localhost:8445/v2/api-docs", ... } Variable is defined using…
Blazh
  • 53
  • 1
  • 6
2
votes
3 answers

npm install error/issue

I have already set proxy configurations in .npmrc file. Executing the npm install command gives me error as follows" $ npm install npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program …
Pooja Kedar
  • 439
  • 2
  • 10
  • 23
1
vote
1 answer

Using npm set config _auth with a GitHub Secret fails

The following npm config set, in my "run" section does not work in my GitHub action. npm config set //my.registry.io/npm/:_auth {{ secret.NPM_ACCESSTOKEN }} I know the value of secret.NPM_ACCESSTOKEN is correct, I've been able to verify with an…
1
vote
1 answer

Cannot set environment variables for npm-config in PowerShell

When I am trying to set environment variables using PowerShell in Windows Terminal with the command set test1=value1, I get no errors. However, when I try to check all environment variables using the set command, I get the following prompt: cmdlet…
1
vote
0 answers

npm ERR! code E401 Incorrect or missing password.If you were trying to login, change your password, create an authentication token

Before Trying tis on My new M1 Macbook Air i tried it on Old MacBook and it works seamlessly on older machine like a charm My package.json { "name": "root", "private": true, "devDependencies": { "lerna": "^3.20.2" } } Steps i…
Gajanan Shinde
  • 183
  • 1
  • 4
  • 15
1
vote
2 answers

npm config set command not working properly

i set the default config for the package.json file using the command, npm config set init-main "script.js" after this i initialized a folder using npm init --yes but the main is still "index.js". But, if i write npm config get init-main it…
Kenny Omega
  • 398
  • 2
  • 12
1
vote
1 answer

Create proxy server to NPM registry

I am trying to create my own verion of local-npm I have this simple http server: #!/usr/bin/env node 'use strict'; import http = require('http'); const s = http.createServer(function (clientRequest, clientResponse) { if (clientRequest.url ===…
user5047085
0
votes
0 answers

SurveyJS: Problem while installing the dependencies

I have several problems while installing SurveyJS locally and all it's dependencies. I am installing them with npm i but still got several problems with the dependencies. My OS version is Ubuntu 20.04.5 LTS. Node -v v19.2.0 NPM -v 8.19.3 Here are…
0
votes
1 answer

Can I have two .npmrc files in a project directory?

I am using a private npm registry (AWS CodeArtifact). To make configuration easier for devs, I have created an .npmrc file in the project directory that contains private (scoped) registry url. I added a command to the package.json file upgrade that…
THX-1138
  • 21,316
  • 26
  • 96
  • 160
0
votes
1 answer

Global npm packages are install on different user directory

Recently I have created a new user on Windows 10 and removed the old user, after that when I try adding an global npm package it get installed on the previous user %appdata%/Roaming directory. I'm not able to use those global libs now. Say for…
Gowtham S
  • 923
  • 14
  • 39
1
2