收藏
回答

$ npm install --save wx-server-sdk@latest 报错,如何解决?

$ npm install --save wx-server-sdk@latest

npm error code ETIMEDOUT

npm error syscall read

npm error errno ETIMEDOUT

npm error network request to https://registry.npmjs.org/wx-server-sdk failed, reason: read ETIMEDOUT

npm error network This is a problem related to network connectivity.

npm error network In most cases you are behind a proxy or have bad network settings.

npm error network

npm error network If you are behind a proxy, please make sure that the

npm error network 'proxy' config is set properly.  See: 'npm help config'

npm error A complete log of this run can be found in: /Users/fuxiaolan/.npm/_logs/2024-09-23T04_52_08_949Z-debug-0.log


回答关注问题邀请回答
收藏

3 个回答

  • showms
    showms
    09-23

    切换一下镜像

    比如设置淘宝镜像地址

    npm config set registry http://registry.npm.taobao.org/

    09-23
    有用
    回复
  • 肖荣豪
    肖荣豪
    09-23

    使用cnpm吧,最近npm不好用

    09-23
    有用
    回复
  • Mr.Zhao
    Mr.Zhao
    发表于小程序端
    09-23

    配置npm国内镜像加速

    09-23
    有用
    回复 2
    • 1号家政
      1号家政
      09-23
      谢谢!只是如何配置npm国内镜像加速  呢?能发个配置步骤吗?
      09-23
      回复
    • Mr.Zhao
      Mr.Zhao
      发表于小程序端
      09-23回复1号家政

      百度一下,这不是微信独有的

      09-23
      回复
登录 后发表内容