@
learnshare 现在指示删掉了 bashrc 里的那些,npmrc 里边还剩如下:
lala@ubu:~/projects/electron/my-app 10:13:56
$ cat ~/.npmrc
noproxy=localhost,127.0.0.1,192.168.,10.
strict-ssl=false
global.GLOBAL_AGENT=true
global.GLOBAL_AGENT.HTTP_PROXY=http://127.0.0.1:8123/
global.GLOBAL_AGENT.HTTPS_PROXY=http://127.0.0.1:8123/
registry=
https://registry.npm.taobao.org执行 ALL_PROXY=http://127.0.0.1:8123 npm install --loglevel silly 的时候没有任何问题,一切正常。
但是执行 ALL_PROXY=http://127.0.0.1:8123 npm install --loglevel silly --save-dev electron 还是报那个错,最终结果显示出来还是安装完成,中间日志如下:
npm sill postinstall
[email protected]npm info lifecycle
[email protected]~postinstall:
[email protected]npm sill postinstall @
electron/
[email protected]npm info lifecycle @
electron/
[email protected]~postinstall: @
electron/
[email protected]npm sill postinstall
[email protected]npm info lifecycle
[email protected]~postinstall:
[email protected]npm sill postinstall
[email protected]npm info lifecycle
[email protected]~postinstall:
[email protected]npm sill postinstall
[email protected]npm info lifecycle
[email protected]~postinstall:
[email protected]>
[email protected] postinstall /home/lala/projects/electron/my-app/node_modules/electron
> node install.js
(node:11541) UnhandledPromiseRejectionWarning: RequestError: connect ETIMEDOUT 13.250.177.223:443
at ClientRequest.<anonymous> (/home/lala/projects/electron/my-app/node_modules/got/source/request-as-event-emitter.js:178:14)
at Object.onceWrapper (events.js:313:26)
at ClientRequest.emit (events.js:228:7)
at ClientRequest.origin.emit (/home/lala/projects/electron/my-app/node_modules/@szmarczak/http-timer/source/index.js:37:11)
at TLSSocket.socketErrorListener (_http_client.js:406:9)
at TLSSocket.emit (events.js:223:5)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
(node:11541) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:11541) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm verb lifecycle
[email protected]~postinstall: unsafe-perm in lifecycle true
npm verb lifecycle
[email protected]~postinstall: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/lala/projects/electron/my-app/node_modules/electron/node_modules/.bin:/home/lala/projects/electron/my-app/node_modules/.bin:/home/lala/.local/bin:/home/lala/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
npm verb lifecycle
[email protected]~postinstall: CWD: /home/lala/projects/electron/my-app/node_modules/electron
npm sill lifecycle
[email protected]~postinstall: Args: [ '-c', 'node install.js' ]
npm sill lifecycle
[email protected]~postinstall: Returned: code: 0 signal: null
npm timing action:postinstall Completed in 31826ms
npm verb unlock done using /home/lala/.npm/_locks/staging-7ae29a0b4c2104a4.lock for /home/lala/projects/electron/my-app/node_modules/.staging
npm timing stage:executeActions Completed in 33034ms
最底部日志如下:
npm sill install saveToDependencies
npm verb saving [ { name: 'electron', spec: '^8.0.0', save: 'devDependencies' } ]
npm verb shrinkwrap skipping write for package.json because there were no changes.
npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm info lifecycle undefined~postshrinkwrap: undefined
npm WARN
[email protected] No description
npm WARN
[email protected] No repository field.
npm sill install printInstalled
+
[email protected]updated 57 packages in 37.468s
2 packages are looking for funding
run `npm fund` for details
npm verb exit [ 0, true ]
npm timing npm Completed in 37893ms
npm info ok