@Woodwalker
Frontend

Проблемы с npm?

Куча различных проблем обнаружились, как фиксить, не представляю.
Система - macOS high sierra 10.13.6, версия npm 6.2.0 версия node 10.9.0
1. Логинюсь через npm login.
Результат
5ce22042bd791139054550.png

2. Далее, если попытаться сделать команду npm whoami -
Результат
5ce220b9b5434588829990.png
Лог файл
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/10.9.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'whoami' ]
2 info using npm@6.2.0
3 info using node@v10.9.0
4 verbose request uri http://nexus.infotech.team/repository/npm/-/whoami
5 verbose request always-auth set; sending authorization
6 info attempt registry request try #1 at 7:59:44
7 verbose request using bearer token for auth
8 verbose request id 0f59622293bbcf95
9 http request GET http://nexus.infotech.team/repository/npm/-/whoami
10 http 404 http://nexus.infotech.team/repository/npm/-/whoami
11 verbose headers { server: 'nginx/1.11.13',
11 verbose headers   date: 'Mon, 20 May 2019 02:59:45 GMT',
11 verbose headers   'content-type': 'application/json',
11 verbose headers   'content-length': '37',
11 verbose headers   connection: 'keep-alive',
11 verbose headers   'keep-alive': 'timeout=5',
11 verbose headers   'x-frame-options': 'SAMEORIGIN',
11 verbose headers   'x-content-type-options': 'nosniff',
11 verbose headers   'content-security-policy':
11 verbose headers    'sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation',
11 verbose headers   'x-content-security-policy':
11 verbose headers    'sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation' }
12 verbose stack Error: Not found : whoami
12 verbose stack     at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:316:12)
12 verbose stack     at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:304:14)
12 verbose stack     at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:216:14)
12 verbose stack     at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:188:22)
12 verbose stack     at Request.emit (events.js:182:13)
12 verbose stack     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1171:10)
12 verbose stack     at Request.emit (events.js:182:13)
12 verbose stack     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1091:12)
12 verbose stack     at Object.onceWrapper (events.js:273:13)
12 verbose stack     at IncomingMessage.emit (events.js:187:15)
13 verbose statusCode 404
14 verbose pkgid whoami
15 verbose cwd /Users/woodwalker/Code/infotech-work/crud
16 verbose Darwin 17.7.0
17 verbose argv "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/bin/npm" "whoami"
18 verbose node v10.9.0
19 verbose npm  v6.2.0
20 error code E404
21 error 404 Not found : whoami
22 error 404
23 error 404 'whoami' is not in the npm registry.
24 error 404 You should bug the author to publish it (or use the name yourself!)
25 error 404 Note that you can also install from a
26 error 404 tarball, folder, http url, or git url.
27 verbose exit [ 1, true ]

3. Если сделать команду npm logout -
Результат
5ce221103447a674025182.png
Лог файл
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/10.9.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'logout' ]
2 info using npm@6.2.0
3 info using node@v10.9.0
4 silly mapToRegistry name /
5 silly mapToRegistry using default registry
6 silly mapToRegistry registry http://nexus.infotech.team/repository/npm/
7 silly mapToRegistry data { type: 'directory',
7 silly mapToRegistry   registry: undefined,
7 silly mapToRegistry   where: '/Users/woodwalker/Code/infotech-work/crud',
7 silly mapToRegistry   raw: '/',
7 silly mapToRegistry   name: undefined,
7 silly mapToRegistry   escapedName: undefined,
7 silly mapToRegistry   scope: undefined,
7 silly mapToRegistry   rawSpec: '/',
7 silly mapToRegistry   saveSpec: 'file:/',
7 silly mapToRegistry   fetchSpec: '/',
7 silly mapToRegistry   gitRange: undefined,
7 silly mapToRegistry   gitCommittish: undefined,
7 silly mapToRegistry   hosted: undefined }
8 silly mapToRegistry uri http://nexus.infotech.team/
9 verbose logout clearing session token for http://nexus.infotech.team/repository/npm/
10 verbose logout invalidating session token for user
11 verbose request uri http://nexus.infotech.team/repository/npm/-/user/token/NpmToken.3eabc2a6-a058-3986-9b36-b3b27f4f27d9
12 verbose request always-auth set; sending authorization
13 info attempt registry request try #1 at 8:00:37
14 verbose request using bearer token for auth
15 verbose request id 55e3dd0e16791530
16 http request DELETE http://nexus.infotech.team/repository/npm/-/user/token/NpmToken.3eabc2a6-a058-3986-9b36-b3b27f4f27d9
17 http 403 http://nexus.infotech.team/repository/npm/-/user/token/NpmToken.3eabc2a6-a058-3986-9b36-b3b27f4f27d9
18 verbose headers { server: 'nginx/1.11.13',
18 verbose headers   date: 'Mon, 20 May 2019 03:00:37 GMT',
18 verbose headers   'transfer-encoding': 'chunked',
18 verbose headers   connection: 'keep-alive',
18 verbose headers   'keep-alive': 'timeout=5',
18 verbose headers   'x-frame-options': 'SAMEORIGIN',
18 verbose headers   'x-content-type-options': 'nosniff',
18 verbose headers   'content-security-policy':
18 verbose headers    'sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation',
18 verbose headers   'x-content-security-policy':
18 verbose headers    'sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation' }
19 verbose stack Error: 403 Forbidden
19 verbose stack     at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:316:12)
19 verbose stack     at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:259:9)
19 verbose stack     at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:216:14)
19 verbose stack     at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:188:22)
19 verbose stack     at Request.emit (events.js:182:13)
19 verbose stack     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1171:10)
19 verbose stack     at Request.emit (events.js:182:13)
19 verbose stack     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1091:12)
19 verbose stack     at Object.onceWrapper (events.js:273:13)
19 verbose stack     at IncomingMessage.emit (events.js:187:15)
20 verbose statusCode 403
21 verbose cwd /Users/woodwalker/Code/infotech-work/crud
22 verbose Darwin 17.7.0
23 verbose argv "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/bin/npm" "logout"
24 verbose node v10.9.0
25 verbose npm  v6.2.0
26 error code E403
27 error 403 Forbidden
28 verbose exit [ 1, true ]

4. Если сделать команду npm i -g npm -
Результат
5ce222374b8f0535992782.png
  • Вопрос задан
  • 235 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы