针对 npm ERR! cb() never called! 问题
在开发项目安装依赖时(npm install) 往往会报 npm ERR! cb()never called!的错误
如图:

解决方法:
一、首先要以管理员模式打开cmd清除你的npm缓存 : npm cache clean -f
二、清除完缓存后,安装最新版本的Node helper: npm install -g n
注意:如果出现npm ERR! notsup Unsupported platform for n@2.1.8: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"})
这样错误信息
如图:
然后执行以下 npm install -g n --force
如图:
三、告诉助手(n)安装最新的稳定版Node:n stable
四、完成上一个命令后,您将获得最新信息。让我们再次运行安装: npm install
如果在执行npm install 非常缓慢的时候,可以试着更换镜像
npm install -g cnpm --registry=https://registry.npm.taobao.org
如图:

再执行 cnpm install,这时候就比较快一些安装依赖文件
安装完依赖文件后,执行 cnpm run dev ,项目就启动了。
以上是开发遇到的一个小问题,如有不足可以随时提出。谢谢
针对 npm ERR! cb() never called! 问题的更多相关文章
- 出现了npm ERR! cb() never called!错误
执行npm i 命令时,出现了npm ERR! cb() never called!错误 解决方案: 1.首先清除你的npm缓存: sudo npm cache clean -f 一般情况执行完后再试 ...
- vue踩坑- 报错npm ERR! cb() never called!
在vue项目中引入饿了么elementUI组件的步骤之中,出现以下的错误: D:\my-project-first>npm i element-ui -S Unhandled rejection ...
- nhandled rejection Error: EPERM: operation not permitted, open 'C:\Program Files\nodejs\node_cache npm ERR! cb() never called!
安装全局包时报错,之前已经遇到过,结果第二次又忘记解决方法,果然还是要记下来,好记性不如烂笔头哇 $ npm i electron -gUnhandled rejection Error: EPERM ...
- npm ERR! cb() never called! npm ERR! This is an error with npm itself. Pleas
原因是:需要用管理员的身份才能进行 方法:点开始,找到命令提示符,右键,点以管理员的身份运行命令即可
- npm ERR publish 403,nodejs发布包流程
nodejs学习体验之发布包,发布环境如下:1:win10系统,2:已安装nodejs. 具体操作步骤如下: *编写模块 1)新建文件夹,比如:somepackage 2) 该文件夹下新建js文件,比 ...
- "npm ERR! Error: EPERM: operation not permitted"问题解决
在基于macaca进行自动化测试的时候,遇到如下问题: E:\AutoTest\Macaca\LocalTEST\macaca-test-sample\macaca-test>macaca do ...
- npm ERR!无法安装任何包的解决办法
npm ERR! Windows_NT 6.1.7601npm ERR! argv "E:\\node\\\\node.exe" "E:\\node\\node_modu ...
- 解决npm安装模块时 npm err! registry error parsing json
最近还真是点背,从yeoman生成一个react项目或是github上克隆一个项目,在npm install的时候, 一直报npm err! registry error parsing json(就 ...
- npm err错误
npm ERR!无法安装任何包的解决办法 通过config命令: npm config set registry http://registry.cnpmjs.org
随机推荐
- json中定义数组
我们经常会看到在js中定义普通函数: function f1(a,b){ console.log(a+b); } f1(); 今天我们看一下如何在json里边定义函数并调用: var json = { ...
- 关于js 中函数的参数
var a = 100; function test(a){ a++; //a(形参)是局部变量 console.log(a); } test(a); console.log(a); //结果是 10 ...
- Highcharts - Pie Chart
1. 饼状图(Pie Chart)示例: <div id="container" style="height: 400px"></div> ...
- 《ArcGIS Runtime SDK for Android开发笔记》——离在线一体化技术:概述
1.前言 数据生产和数据展示是常见的两大专业级移动GIS应用场景,这里我们针对数据生产环节的ArcGIS的离在线一体化技术给大家做一个基本的介绍和梳理. 使用ArcGIS离在线一体化技术首先需要以下基 ...
- Winform中 DataGridView控件中的 CheckBox 的值读出来 始终 为 False ,已解决
private void DGV_DetailsViewer_CellContentClick(object sender, DataGridViewCellEventArgs e) { )) { D ...
- Java 实现斐波那契数列
public class Fibonacci { private static int getFibo(int i) { if (i == 1 || i == 2) return 1; else re ...
- TELNET_COMMAND
TELENT COMMAND DEFINE:Telnet is a command control your cmd windows of remote computer. step: 1.Open ...
- 免费的SSL证书,你值得拥有!Let's Encrypt 试用体验记录
早上收到 Let’s Encrypt 的邮件,说偶之前申请的已经通过了,于是马上开始试用.Let’s Encrypt 是一个新的数字证书认证机构,它通过自动化的过程消除创建和安装证书的复杂性,为网站提 ...
- 林锐书:写一个hello world by seasoned professional
#include <iostream> #include <string.h> using namespace std; class String { private: int ...
- PCI PCI-X PCI-E介绍
1.PCI 外设互联标准(或称个人电脑接口,Personal Computer Interface),实际应用中简称PCI(Peripheral Component Interconnect),是一种 ...