go-包管理-踩坑

安装或者 运行 go build 时候报错: go: finding github.com/modern-go/concurrent latestgo: finding gopkg.in/check.v1 latestgo: golang.org/x/net@v0.0.0-20190503192946-f4e77d36d62c: unrecognized import path "golang.org/x/net" (https fetch: Get https://golang.org/x/net?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)说明你需要proxy了(其实用了proxy有时候也没用),或者是用 module 的 replace 来转一下,这个方法有以下缺点:1.有些包还是转发失败2.需要一个个的设置很麻烦 找了许久,另外一种办法设置global go proxy 具体方法如下:1.先清除 cache ,到特定目录删除文件2.window下 打开 power shell 然后执行如下命令: ...

June 25, 2019 · 1 min · jiezi

OS-X-开发环境配置homebrew-yarn-nvm

问题brew install yarn --without-node 不再起作用,yarn 已经删除了 option --without-node。 准备homebrew 已安装。(非必需条件)使用 zsh 替换 bash: chsh -s /bin/zsh安装步骤安装 nvm: 确定 ~/.bash_profile 是否存在,如果没有则新建一个;执行 touch ~/.bash_profile;执行安装命令: // cURL:curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash// or Wget:wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash安装 node: // 安装最新 nodenvm install node --latest-npm// Always default to the latest available node version on a shellnvm alias default node检查 node: node -v显示 node 版本,例如 v12.1.0 安装 yarn: 安装 yarn 时不安装 node: ...

April 30, 2019 · 1 min · jiezi