#javascript #node.js #npm #inquirerjs
Вопрос:
Каждый раз, когда я пытаюсь установить inquirer и commander в определенную папку (репозиторий GitHub для курса по интерфейсным мастерам). Я, как правило, получаю эти ошибки каждый раз, когда пытаюсь это сделать.
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
Самое странное, что я не использую никаких прокси-серверов и имею приличное подключение к Интернету. Я попробовал подключения с терминала, и все они работают просто отлично. Также проверили подключение к registry.npmjs.org/
Однако, когда я пытаюсь сделать это за пределами каталога, все, кажется, в порядке.
Ниже приведен ~/.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
Я пробовал множество исправлений, таких как удаление прокси-линий, изменение реестров и прочее, но, похоже, ничего не работает. Кроме того, когда я попытался сделать то же самое в каталоге другого проекта, в этом не было файла package-lock.json, я, кажется, обнаружил около 40 уязвимостей. Я установил узел через nvm.
Комментарии:
1. NPM пытается извлечь пакет yargs из
https://artifactory.1and1.org/artifactory/api/npm/ciso-npm-virtual/yargs/-/yargs-11.1.0.tgz
. Я проверил этот домен на DNS checker и, похоже, этого сайта сейчас не существует. Это не проблема с вашей конфигурацией. Хранилище, обслуживающее этот конкретный пакет, невозможно обнаружить.2. А, я вижу, в этом есть большой смысл. Таким образом, это одна из зависимостей, которая портится, потому что исходный веб-сайт пакета не существует. Большое спасибо!