npm i node-sass 报错&npm 镜像切换
npm install --save node-sass --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/dist --sass-binary-site=http://npm.taobao.org/mirrors/node-sass
or
先改变本机的sass下载的数据源
npm config set sass-binary-site http://npm.taobao.org/mirrors/node-sass
然后 安装
npm i node-sass -S
npm更换成淘宝的源
npm config set registry https://registry.npm.taobao.org
– 配置后可通过下面方式来验证是否成功
npm config get registry
发布npm包的时候切换为原始url:npm config set registry https://registry.npmjs.org
也可安装nrm【管理npm的数据源的工具】:npm i -g nrm
显示数据源list: nrm ls
npm ---- https://registry.npmjs.org/
cnpm --- http://r.cnpmjs.org/
* taobao - http://registry.npm.taobao.org/
edunpm - http://registry.enpmjs.org/
eu ----- http://registry.npmjs.eu/
au ----- http://registry.npmjs.org.au/
sl ----- http://npm.strongloop.com/
nj ----- https://registry.nodejitsu.com/
pt ----- http://registry.npmjs.pt/
切换npm数据源:nrm use taobao或者nrm use eu
----------------------- 使用yarn ------------------------------------------
yarn config get registry
# -> https://registry.yarnpkg.com
可以改成 taobao 的源:
yarn config set registry https://registry.npm.taobao.org
# -> yarn config v0.24.5
# -> success Set "registry" to "https://registry.npm.taobao.org".
# -> Done in 0.03s.
npm i node-sass 报错&npm 镜像切换的更多相关文章
- npm install的时候报错 npm err code 1
在学习vue的时候,npm install的时候报错 npm err code 1,当时很郁闷,是‘vue init webpack my-project’命令新建的模版项目 ,怎么会报错,第一次遇 ...
- npm包管理器报错-npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/@XXX(over 30000ms)
由于这两天买的新电脑在短期内频频蓝屏.卡机,不得不把自己其他的本本拿出来换上,但是程序员换电脑是真的痛苦,其他不说就说一个配环境 真的折腾哈 我是一名前端菜鸟,现在自己的本本上使用的是npm包管理工具 ...
- 解决Homestead yarn , npm run dev, 命令报错问题!
解决Homestead yarn , npm run dev, 命令报错问题! 2018年06月01日 11:50:51 偶尔发发颠 阅读数:1654 版权声明:本文为博主原创,未经博主同意,不 ...
- cnmp安装失败,报错npm ERR! enoent ENOENT: no such file or directory,
1.cnmp安装失败 2.提示如下: bogon:node_modules liangjingming$ sudo npm install cnpm -g --registry=https://reg ...
- 解决 npm run dev b报错 “'webpack-dev-server' 不是内部或外部命令,也不是可运行的程序 或批处理文件。”
摘自:https://www.cnblogs.com/laraLee/p/9174383.html 前提: 电脑已经安装了nodeJS和npm, 项目是直接下载的zip包. 在项目目录下运行“npm ...
- mac本地安装全局包报错npm WARN checkPermissions
安装本地全局包时,本地报错 npm WARN checkPermissions Missing write access to /Users/xxx/.nvm/versions/node/v11.10 ...
- webpack配置自动打包重新运行npm run dev出现报错
webpack配置自动打包重新运行npm run dev出现报错 运行npm run dev出现如下报错 Listening at http://localhost:8080(node:2328) U ...
- 【问题与解决】Mac OS通过 npm 安装 React Native 报错(checkPermissions Missing write access to /usr/local/lib/node_modules)
报错情况: 当Mac OS通过 npm 安装 React Native 报错,警告文字为:checkPermissions Missing write access to /usr/local/lib ...
- Vue项目中执行npm run dev 不报错也不显示点击的地址链接
问题描述: 输入npm run dev 没有报错也没有显示可以点击的地址链接,如下图: 解决方法: 具体配置: autoOpenBrowser默认为false,改为true.重新 npm run de ...
- npm install命令遇到relocation error: npm: symbol SSL_set_cert_cb的报错问题
在安装elasticsearch-head的过程中npm install遇到如下报错 [root@localhost elasticsearch-head]# npm install npm: rel ...
随机推荐
- 繁繁的数字 背包DP
繁繁的数字 背包DP 问一个数\(n\)有多少种二进制分解方案数 \(n\le 10^5\) 如7有7=4+2+1=4+1+1+1=2+2+2+1=2+2+1+1+1=2+1+1+1+1+1=1+1+ ...
- AtCoder Grand Contest 018题解
传送门 \(A\) 根据裴蜀定理显然要\(k|\gcd(a_1,...,a_n)\),顺便注意不能造出大于\(\max(a_1,...,a_n)\)的数 int n,g,k,x,mx; int mai ...
- XMind 8 pro for Mac(思维导图软件)附序列号和破解教程【亲测可用!!】
年后了,又到一年面试时,最近在用思维导图整理知识点,原本使用的是在线思维导图 ProcessOn,奈何免费版的个人文件数量只能有9 张,远远不能满足我的需要,所以还是使用一个本地版的吧,but依然不想 ...
- 《挑战30天C++入门极限》对C++递增(增量)运算符重载的思考
对C++递增(增量)运算符重载的思考 在前面的章节中我们已经接触过递增运算符的重载,那时候我们并没有区分前递增与后递增的差别,在通常情况下我们是分别不出++a与a++的差别的,但的确他们直接是 ...
- 说明os,sys模块有什么不同
官方解释: os: This module provides a portable way of usingoperating system dependent functionality. 翻译:提 ...
- Java SpringBoot 实体类数据自动验证
package demo.dto; import org.hibernate.validator.constraints.Length; import javax.validation.constra ...
- Java中JVM内存结构
Java中JVM内存结构 线程共享区 方法区: 又名静态成员区域,包含整个程序的 class.static 成员等,类本身的字节码是静态的:它会被所有的线程共享和是全区级别的: 属于共享内存区域,存储 ...
- Intellij IDEA的Facets和Artifacts
Facets: Facets表述了在Module中使用的各种各样的框架.技术和语言.这些Facets让Intellij IDEA知道怎么对待module内容,并保证与相应的框架和语言保持一致. 使用F ...
- Faster async functions and promises
https://v8.dev/blog/fast-async async function computeAnswer() { return 42;}undefinedconst p = comput ...
- https://zhuanlan.zhihu.com/p/32553477
科普:QUIC协议原理分析