error Error: https://registry.npmmirror.com/@antv%2fdata-set: tunneling socket could not be establis
·
一、问题:
error Error: https://registry.npmmirror.com/@antv%2fdata-set: tunneling socket could not be established, statusCode=403
error Error: http://npm.service.com/@antv%2fdata-set: Request “http://npm.service.com/@antv%2fdata-set” returned a 403
二、现象:
C:\Users\lenovo\Downloads\testnpminstall>yarn
yarn install v1.22.22
info No lockfile found.
info There appears to be trouble with your network connection. Retrying...
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error Error: https://registry.npmmirror.com/@antv%2fdata-set: tunneling socket could not be established, statusCode=403
at ClientRequest.onConnect (C:\Users\lenovo\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:152885:19)
at Object.onceWrapper (node:events:632:26)
at ClientRequest.emit (node:events:517:28)
at Socket.socketOnData (node:_http_client:581:11)
at Socket.emit (node:events:517:28)
at addChunk (node:internal/streams/readable:368:12)
at readableAddChunk (node:internal/streams/readable:341:9)
at Readable.push (node:internal/streams/readable:278:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
verdaccio私服报错:http://npm.service.com
yarn install v1.22.22
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
info There appears to be trouble with your network connection. Retrying...
[1/4] Resolving packages...
error Error: http://npm.service.com/@antv%2fdata-set: Request "http://npm.service.com/@antv%2fdata-set" returned a 403
at params.callback [as _callback] (C:\Users\lenovo\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:66689:18)
at self.callback (C:\Users\lenovo\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:141410:22)
at Request.emit (node:events:517:28)
at Request.<anonymous> (C:\Users\lenovo\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:142382:10)
at Request.emit (node:events:517:28)
at IncomingMessage.<anonymous> (C:\Users\lenovo\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:142304:12)
at Object.onceWrapper (node:events:631:28)
at IncomingMessage.emit (node:events:529:35)
at endReadableNT (node:internal/streams/readable:1400:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
info There appears to be trouble with your network connection. Retrying...
三、解决
C:\Users\lenovo\Downloads\testnpminstall>npm install
/^C
C:\Users\lenovo\Downloads\testnpminstall>yarn
yarn install v1.22.22
info No lockfile found.
info There appears to be trouble with your network connection. Retrying...
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
⠐ @antv/data-set@^0.11.8
C:\Users\lenovo\Downloads\testnpminstall>yarn
yarn install v1.22.22
info No lockfile found.
info There appears to be trouble with your network connection. Retrying...
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error Error: https://registry.npmmirror.com/@antv%2fdata-set: tunneling socket could not be established, statusCode=403
at ClientRequest.onConnect (C:\Users\lenovo\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:152885:19)
at Object.onceWrapper (node:events:632:26)
at ClientRequest.emit (node:events:517:28)
at Socket.socketOnData (node:_http_client:581:11)
at Socket.emit (node:events:517:28)
at addChunk (node:internal/streams/readable:368:12)
at readableAddChunk (node:internal/streams/readable:341:9)
at Readable.push (node:internal/streams/readable:278:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
C:\Users\lenovo\Downloads\testnpminstall>npm config get proxy
null
C:\Users\lenovo\Downloads\testnpminstall>npm config get https-proxy
null
C:\Users\lenovo\Downloads\testnpminstall>npm config set registry https://registry.npmmirror.com/
C:\Users\lenovo\Downloads\testnpminstall>npm config get proxy
null
C:\Users\lenovo\Downloads\testnpminstall>npm config get https-proxy
null
C:\Users\lenovo\Downloads\testnpminstall>curl -I https://registry.npmmirror.com/@antv%2fdata-set
HTTP/1.1 200 OK
Server: Tengine
Content-Type: application/json; charset=utf-8
Content-Length: 191990
Connection: keep-alive
Strict-Transport-Security: max-age=5184000
Date: Thu, 17 Apr 2025 08:35:18 GMT
Vary: Origin, Accept, Accept-Encoding
request-id: 0732ee32-7cec-4c30-ae0f-2c7b93f90f4f
etag: W/"98433bf53508ca20c90af9ce0f5793966341ec23"
cache-control: public, max-age=300
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
x-download-options: noopen
x-readtime: 10.22
Via: cn1602.l1, kunlun1.cn1602, l2cn8045.l2, cache25.l2cn8045, izuf693b8e9ijm4o957vvnz, cache25.l2cn8045[60,59,200-0,M], cache60.l2cn8045[60,0], kunlun1.cn1602[137,136,200-0,M], kunlun6.cn1602[138,0]
Ali-Swift-Global-Savetime: 1744878918
X-Cache: MISS TCP_MISS dirn:-2:-2
X-Swift-SaveTime: Thu, 17 Apr 2025 08:35:18 GMT
X-Swift-CacheTime: 300
Timing-Allow-Origin: *
EagleId: 74fd1d1a17448789186236867e
C:\Users\lenovo\Downloads\testnpminstall>npm config set registry https://registry.npmmirror.com/
C:\Users\lenovo\Downloads\testnpminstall>npm config get registry
https://registry.npmmirror.com/
C:\Users\lenovo\Downloads\testnpminstall>yarn
yarn install v1.22.22
info No lockfile found.
info There appears to be trouble with your network connection. Retrying...
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error Error: https://registry.npmmirror.com/@antv%2fdata-set: tunneling socket could not be established, statusCode=403
at ClientRequest.onConnect (C:\Users\lenovo\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:152885:19)
at Object.onceWrapper (node:events:632:26)
at ClientRequest.emit (node:events:517:28)
at Socket.socketOnData (node:_http_client:581:11)
at Socket.emit (node:events:517:28)
at addChunk (node:internal/streams/readable:368:12)
at readableAddChunk (node:internal/streams/readable:341:9)
at Readable.push (node:internal/streams/readable:278:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
C:\Users\lenovo\Downloads\testnpminstall>npm config get registry
https://registry.npmmirror.com/
C:\Users\lenovo\Downloads\testnpminstall>yarn config list
yarn config v1.22.22
info yarn config
{
'version-tag-prefix': 'v',
'version-git-tag': true,
'version-commit-hooks': true,
'version-git-sign': false,
'version-git-message': 'v%s',
'init-version': '1.0.0',
'init-license': 'MIT',
'save-prefix': '^',
'bin-links': true,
'ignore-scripts': false,
'ignore-optional': false,
registry: 'http://npm.service.com/',
'strict-ssl': true,
'user-agent': 'yarn/1.22.22 npm/? node/v18.20.4 win32 x64',
'https-proxy': 'http://10.100.2.100:3000',
lastUpdateCheck: 1743298963878,
proxy: 'http://10.100.2.100:3000'
}
info npm config
{
registry: 'https://registry.npmmirror.com/',
home: 'https://npmmirror.com',
'//npm.123456.com/:_authToken': '123456789'
}
Done in 0.05s.
C:\Users\lenovo\Downloads\testnpminstall>yarn config delete proxy
yarn config v1.22.22
success Deleted "proxy".
Done in 0.05s.
C:\Users\lenovo\Downloads\testnpminstall>yarn config delete https-proxy
yarn config v1.22.22
success Deleted "https-proxy".
Done in 0.05s.
C:\Users\lenovo\Downloads\testnpminstall>npm config set registry https://registry.npmjs.org/
C:\Users\lenovo\Downloads\testnpminstall>yarn config set registry https://registry.npmjs.org/
yarn config v1.22.22
success Set "registry" to "https://registry.npmjs.org/".
Done in 0.05s.
C:\Users\lenovo\Downloads\testnpminstall>npm install -g yarn
added 1 package in 7s
C:\Users\lenovo\Downloads\testnpminstall>npm install -g nrm
added 32 packages in 17s
C:\Users\lenovo\Downloads\testnpminstall>nrm ls
* npm ------------ https://registry.npmjs.org/
yarn ----------- https://registry.yarnpkg.com/
tencent -------- https://mirrors.tencent.com/npm/
cnpm ----------- https://r.cnpmjs.org/
taobao --------- https://registry.npmmirror.com/
npmMirror ------ https://skimdb.npmjs.com/registry/
huawei --------- https://repo.huaweicloud.com/repository/npm/
ccnpm -------- http://npm.service.com/
ccnpmip ------ http://10.100.2.2:4873/
nexusnpmall ---- http://10.100.2.2:8081/repository/npm-all/
nexuspush ------ http://10.100.2.2:8081/repository/npm-hosted/
C:\Users\lenovo\Downloads\testnpminstall>yarn
yarn install v1.22.22
info No lockfile found.
[1/4] Resolving packages...
⠄ @antv/g-math@3.0.0
最后,yarn成功,install依赖
更多推荐
所有评论(0)