Every time I try to install inquirer and commander in a certain folder (a GitHub repo for a course on frontend masters). I tend to get these errors every time I try to do so.
npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to https://artifactory.1and1.org/artifactory/api/npm/ciso-npm-virtual/yargs/-/yargs-11.1.0.tgz failed, reason: getaddrinfo ENOTFOUND artifactory.1and1.org
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/neeladri/.npm/_logs/2021-06-12T08_42_31_117Z-debug.log
The weird part is that I do not use any proxy and have a decent internet connection. I have tries the connections from the terminal and they all work just fine. Also have checked the connection to registry.npmjs.org/ However, when I try to do these outside the directory everything seems to be fine. Below is the ~/.npmrc
;;;;
; npm userconfig file: /home/neeladri/.npmrc
; this is a simple ini-formatted file
; lines that start with semi-colons are comments
; run `npm help 7 config` for documentation of the various options
;
; Configs like `@scope:registry` map a scope to a given registry url.
;
; Configs like `//<hostname>/:_authToken` are auth that is restricted
; to the registry host specified.
//registry.npmjs.org/:_authToken=0c3edf13-f4f8-4c4c-82cc-190ee17156b9
registry=https://registry.npmjs.org/
;;;;
; all available options shown below with default values
;;;;
; _auth=null
; access=null
; all=false
; allow-same-version=false
; also=null
; audit=true
; audit-level=null
; auth-type=legacy
; before=null
; bin-links=true
; browser=null
; ca=null
; cache=~/.npm
; cache-max=null
; cache-min=0
; cafile=null
; call=
; cert=null
; ci-name=null
; cidr=null
; color=true
; commit-hooks=true
; depth=null
; description=true
; dev=false
;
; diff-ignore-all-space=false
; diff-name-only=false
; diff-no-prefix=false
; diff-dst-prefix=b/
; diff-src-prefix=a/
; diff-text=false
; diff-unified=3
; dry-run=false
; editor=vi
; engine-strict=false
; fetch-retries=2
; fetch-retry-factor=10
; fetch-retry-maxtimeout=60000
; fetch-retry-mintimeout=10000
; fetch-timeout=300000
; force=false
; foreground-scripts=false
; format-package-lock=true
; fund=true
; git=git
; git-tag-version=true
; global=false
; global-style=false
; globalconfig=
; heading=npm
; https-proxy=null
; if-present=false
; ignore-scripts=false
;
; include-staged=false
; init-author-email=
; init-author-name=
; init-author-url=
; init-license=ISC
; init-module=~/.npm-init.js
; init-version=1.0.0
; init.author.email=
; init.author.name=
; init.author.url=
; init.license=ISC
; init.module=~/.npm-init.js
; init.version=1.0.0
; json=false
; key=null
; legacy-bundling=false
; legacy-peer-deps=false
; link=false
; local-address=null
; loglevel=notice
; logs-max=10
; long=false
; maxsockets=15
; message=%s
; node-options=null
; node-version=v16.3.0
; noproxy=
; npm-version=7.15.1
; offline=false
;
; only=null
; optional=null
; otp=null
;
; package-lock=true
; package-lock-only=false
; parseable=false
; prefer-offline=false
; prefer-online=false
; prefix=
; preid=
; production=null
; progress=true
; proxy=null
; read-only=false
; rebuild-bundle=true
; registry=https://registry.npmjs.org/
; save=true
; save-bundle=false
; save-dev=false
; save-exact=false
; save-optional=false
; save-peer=false
; save-prefix=^
; save-prod=false
; scope=
; script-shell=null
; searchexclude=
; searchlimit=20
; searchopts=
; searchstaleness=900
; shell=/usr/bin/zsh
; shrinkwrap=true
; sign-git-commit=false
; sign-git-tag=false
; sso-poll-frequency=500
; sso-type=oauth
; strict-peer-deps=false
; strict-ssl=true
; tag=latest
; tag-version-prefix=v
; timing=false
; tmp=/tmp
; umask=0
; unicode=true
; update-notifier=true
; usage=false
; user-agent=npm/{npm-version} node/{node-version} {platform} {arch} workspaces/{workspaces} {ci}
; userconfig=~/.npmrc
; version=false
; versions=false
; viewer=man
; which=null
;
; workspaces=false
; yes=null
I have been trying a lot of fixes like removing proxy lines changing registries and stuff but nothing seems to work. Further, when I have tried doing the same thing in another project's directory, this one did not have the package-lock.json, I seem to get around 40 vulnerabilities. I have installed node through nvm.