qq_32763075 2017-09-02 14:34 采纳率: 0%
浏览 5161

npm 安装任何模块都报错

npm ERR! code ERR_INVALID_ARG_TYPE
npm ERR! The "ca" argument must be one of type string, Buffer, TypedArray, or DataView

npm ERR! A complete log of this run can be found in:
npm ERR! /home/wusiqi/.npm/_logs/2017-09-02T14_21_36_949Z-debug.log

上面提示的.log内容如下:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'webpack',
1 verbose cli 'gulp',
1 verbose cli '-g' ]
2 info using npm@5.3.0
3 info using node@v9.0.0-pre
4 verbose npm-session 6974fb1697ebe308
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData error for webpack@latest The "ca" argument must be one of type string, Buffer, TypedArray, or DataView
8 silly fetchPackageMetaData error for gulp@latest The "ca" argument must be one of type string, Buffer, TypedArray, or DataView
9 verbose stack TypeError [ERR_INVALID_ARG_TYPE]: The "ca" argument must be one of type string, Buffer, TypedArray, or DataView
9 verbose stack at validateKeyCert (_tls_common.js:58:11)
9 verbose stack at Object.createSecureContext (_tls_common.js:91:7)
9 verbose stack at Object.exports.connect (_tls_wrap.js:1049:48)
9 verbose stack at HttpsAgent.createConnection (https.js:111:22)
9 verbose stack at HttpsAgent.createSocket (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/_http_agent.js:271:26)
9 verbose stack at HttpsAgent.createSocket (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/agent.js:77:11)
9 verbose stack at HttpsAgent.addRequest (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/_http_agent.js:240:10)
9 verbose stack at new ClientRequest (_http_client.js:271:16)
9 verbose stack at Object.request (http.js:39:10)
9 verbose stack at request (https.js:239:15)
9 verbose stack at fetch.Promise (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/index.js:54:17)
9 verbose stack at Promise ()
9 verbose stack at fetch (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/index.js:41:10)
9 verbose stack at retry (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/index.js:317:14)
9 verbose stack at /usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/promise-retry/index.js:29:24
9 verbose stack at
10 verbose cwd /home/wusiqi/desk/study/music_box
11 verbose Linux 4.2.0-42-generic
12 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "webpack" "gulp" "-g"
13 verbose node v9.0.0-pre
14 verbose npm v5.3.0
15 error code ERR_INVALID_ARG_TYPE
16 error The "ca" argument must be one of type string, Buffer, TypedArray, or DataView
17 verbose exit [ 1, true ]

  • 写回答

2条回答 默认 最新

  • threenewbee 2017-09-03 14:22
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 求chat4.0解答一道线性规划题,用lingo编程运行,第一问要求写出数学模型和lingo语言编程模型,第二问第三问解答就行,我的ddl要到了谁来求了
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果