解决 windows npm ERR! asyncWrite is not a function 问题

重装过node,cmd中 node -v,npm -v 提示版本都没有问题,但是在vue项目中npm i 的时候出现了npm ERR! asyncWrite is not a function 问题,网上众说纷纭,有的说node的版本和npm的版本不兼容问题,试过各种方法,还是在stack Overflow中找到了解决方法,有个外国网友是这样回答的:

Solution for windows platform

  1. Uninstall Node
  2. Delete folder from programfiles if exist (C:\Program Files\nodejs)
  3. Delete npm‘s data folder: C:\Users{Your uername}\AppData\Roaming\nmp

Install node Again(use different installation folder like "C:\Program Files\nodejs-2")

也就是,

1、先卸载node

2、删除C:\Program Files\nodejs (也有可能你安装在了d盘  无所谓 找到就行,后来我才发现 即使你卸载了node 这些残留还是有  emmm...

3、删除C下面npm文件夹 (电脑直接搜npm  或者 原文C:\Users{Your uername}\AppData\Roaming\nmp

4、重新装node(随便啥版本)  安装的时候可以新建一个文件夹 例如nodejs_2

然后 然后就没了  再运行 的时候就可以install 了

原文地址:https://stackoverflow.com/questions/50597159/npm-err-asyncwrite-is-not-a-function

原文地址:https://www.cnblogs.com/GlenLi/p/10173609.html

时间: 2024-08-30 15:15:08

解决 windows npm ERR! asyncWrite is not a function 问题的相关文章

npm ERR! asyncWrite is not a function

1.背景:原先node是官网下载安装的,通过brew更新了下,然后到项目里npm i 安装包时候,报错2.解决:卸载官网下载安装的node,重装 sudo rm -rf /usr/local/{bin/{node,npm},lib/node_modules/npm,lib/node,share/man/*/node.*} //卸载node 原文地址:https://www.cnblogs.com/cynthia-wuqian/p/9322777.html

解决【npm ERR! Unexpected end of JSON input while parsing near '...sh_time":141072930277'】方案

问题描述执行npm install的时候报错npm ERR! Unexpected end of JSON input while parsing near '...sh_time":141072930277'.如下图: 解决方案直接执行 npm cache clean --force, 如果执行成功,再npm install即可.如果执行失败,请先升级npm,即npm i -g npm, 最后再执行npm cache clean --force, 最后再npm install.如果还执行失败,

解决npm安装模块时 npm err! registry error parsing json

最近还真是点背,从yeoman生成一个react项目或是github上克隆一个项目,在npm install的时候, 一直报npm err! registry error parsing json(就是一行红色的,因为解决了,图没了,也懒的复现了) 我的解决方式是 因为是错误中有registry,所以就应该是registry 的问题 因为我的电脑有vpn 而且网速3m/s,所以网络问题is no 因为我设置了淘宝镜像吗, 先来npm config list一下试试 哦原来是我安装了淘宝镜像啊,

解决npm ERR!

一:[Unexpected end of JSON input while parsing near]报错 最近的vue项目中在执行 npm install 时会报错误: npm ERR! Unexpected end of JSON input while parsing near 这个错误的解决方法有以下几种: 1.删掉package.lock.json 2.清除cache npm cache clean --force 3.进入下面这个文件夹清除cache路径:C:Users PCAppD

npm install 报错(npm ERR! errno -4048,Error: EPERM: operation not permitted,)解决方法

npm ERR! path E:\SouthernPowerGridProject\web_project\AutoOPS\autoops\node_modules\fsevents\node_modules\dashdash\node_modulesnpm ERR! code EPERMnpm ERR! errno -4048npm ERR! syscall scandirnpm ERR! Error: EPERM: operation not permitted, scandir 'E:\S

"npm ERR! Error: EPERM: operation not permitted"问题解决

在基于macaca进行自动化测试的时候,遇到如下问题: E:\AutoTest\Macaca\LocalTEST\macaca-test-sample\macaca-test>macaca doctor   Node.js checklist:   node env: C:\Program Files\nodejs\node.exe  node version: v6.3.0   Android checklist:   JAVA version is `1.8.0_91`  JAVA_HOME

cnmp安装失败,报错npm ERR! enoent ENOENT: no such file or directory,

1.cnmp安装失败 2.提示如下: bogon:node_modules liangjingming$ sudo npm install cnpm -g --registry=https://registry.npm.taobao.org Password: /usr/local/lib └── (empty) npm ERR! Darwin 16.4.0 npm ERR! argv "/usr/local/Cellar/node/7.8.0/bin/node" "/usr

npm ERR!

FAILED! => {"changed": false, "cmd": "/usr/bin/npm install --registry https://registry.npm.taobao.org",  "msg": "npm ERR! Linux 3.10.0-514.el7.x86_64\nnpm ERR! argv \"/usr/bin/node\" \"/usr/bi

npm ERR! Unexpected end of JSON input while parsing near '...nd-index-1.0.2.tgz"

一.问题 npm安装时报错:npm ERR! Unexpected end of JSON input while parsing near '...nd-index-1.0.2.tgz" 二.解决方法 npm cache clean --force 三.问题出现原因 四.此方法的利弊 -- 待查 -- npm ERR! Unexpected end of JSON input while parsing near '...nd-index-1.0.2.tgz" 原文地址:https: