Home > Back-end >  npm install error :SocksProxyAgent is not a constructor
npm install error :SocksProxyAgent is not a constructor

Time:07-08

error log:

50 warn skipping integrity check for git dependency https://[email protected]/jitsi/strophejs-plugin-stream-management.git
51 warn skipping integrity check for git dependency https://[email protected]/jitsi/rnnoise-wasm.git
52 warn skipping integrity check for git dependency https://[email protected]/jitsi/react-native-video.git
53 warn skipping integrity check for git dependency https://[email protected]/software-mansion/react-native-reanimated.git
54 warn skipping integrity check for git dependency https://[email protected]/jitsi/sdp-interop.git
55 silly audit bulk request failed undefined
56 verbose audit error TypeError: SocksProxyAgent is not a constructor
56 verbose audit error     at getProxy (/Users/xb2022/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/make-fetch-happen/lib/agent.js:201:12)
56 verbose audit error     at getAgent (/Users/xb2022/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/make-fetch-happen/lib/agent.js:67:19)
56 verbose audit error     at remoteFetch (/Users/xb2022/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/make-fetch-happen/lib/remote.js:31:17)
56 verbose audit error     at fetch (/Users/xb2022/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/make-fetch-happen/lib/fetch.js:99:13)
56 verbose audit error     at makeFetchHappen (/Users/xb2022/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/make-fetch-happen/lib/index.js:10:10)
56 verbose audit error     at doFetch (/Users/xb2022/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/index.js:108:15)
56 verbose audit error     at async Map.[getReport] (/Users/xb2022/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:333:21)
56 verbose audit error     at async Map.run (/Users/xb2022/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:106:19)
57 silly audit error undefined
58 timing auditReport:getReport Completed in 610ms
59 silly audit report null

This is error logging in NPM install; Has this happened to anyone?

CodePudding user response:

NPM and Git need add Network proxy! NPM configuration:

npm config set proxy http://127.0.0.1:1088
npm config set https-proxy http://127.0.0.1:1088
npm config set strict-ssl false

cancel:
npm config delete proxy
npm config delete https-proxy

Git configuration:

git config --global http.proxy http://127.0.0.1:1088
git config --global https.proxy https://127.0.0.1:1088

cancel:
git config --global --unset http.proxy
git config --global --unset https.proxy
  • Related