#1 管理员权限运行 docker docker stop taro docker rm taro #docker run -itd --name taro node:latest docker run -itd -v $PWD/:/home/taro --name taro node:latest docker exec -it taro /bin/bash #下面代码是换源
npm config get registry npm config set registry https://registry.npm.taobao.org/ yarn config get registry yarn config set registry https://registry.npm.taobao.org/ npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ yarn config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ yarn config delete proxy npm config rm proxy npm config rm https-proxy yarn global add mirror-config-china yarn global add node-sass yarn global add @tarojs/cli yarn install npm rebuild node-sass --save-dev yarn run dev:weapp
mac 下,得把yarn 全局包 位置修改了 缓存包位置也得改
#全局位置 yarn config set global-folder /Users/wqk/Softwares/.........位置自己选 #缓存位置 yarn config set cache-folder /Users/wqk/Softwares/.........位置自己选
这样基本没啥权限问题了