Cannot find module '../lib/utils/unsupported.js'
运行npm run clean出错:
internal/modules/cjs/loader.js:
throw err;
^ Error: Cannot find module '../lib/utils/unsupported.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js::)
at Function.Module._load (internal/modules/cjs/loader.js::)
at Module.require (internal/modules/cjs/loader.js::)
at require (internal/modules/cjs/helpers.js::)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js::
at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js::)
at Module._compile (internal/modules/cjs/loader.js::)
at Object.Module._extensions..js (internal/modules/cjs/loader.js::)
at Module.load (internal/modules/cjs/loader.js::)
at tryModuleLoad (internal/modules/cjs/loader.js::)
解决办法:
sudo rm -rf /usr/local/lib/node_modules/npm
先把之前的文件删除
userdeMBP:~ user$ brew uninstall --force node
Error: Refusing to uninstall /usr/local/Cellar/node/11.1.
because it is required by yarn, which is currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies node
然后再删除node,因为我有安装yarn,所以使用--ignore-dependencies:
userdeMBP:~ user$ brew uninstall --ignore-dependencies node
Uninstalling /usr/local/Cellar/node/11.1.... (, files, .0MB)
node 9.10. is still installed.
Remove all versions with `brew uninstall --force node
然后再安装:
userdeMacBook-Pro:~ user$ brew install node
==> Downloading https://homebrew.bintray.com/bottles/node-11.1.0.mojave.bottle.t
Already downloaded: /Users/user/Library/Caches/Homebrew/downloads/2d71518883b6f6ce458778abea35981525ecdee4a14408431b9f42ed132015e1--node-11.1..mojave.bottle.tar.gz
==> Pouring node-11.1..mojave.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary
Cannot find module '../lib/utils/unsupported.js'的更多相关文章
- Error: Cannot find module '../lib/utils/unsupported.js'
报错: nodejs : Error: Cannot find module '../lib/utils/unsupported.js' 解决办法(linux): 去node目录下:/node***/ ...
- Unexpected identifier in composer-common/lib/cardstore/businessnetworkcardstore.js:54
c错误描述 Unexpected identifier in composer-common/lib/cardstore/businessnetworkcardstore.js:54 yo hyper ...
- 解决ImportError: No module named utils
转载:https://blog.csdn.net/weixin_43979572/article/details/86159265 在Python中遇到了导包错误,其实包已经有了.原因是我再B文件的a ...
- Android runProguard配置 导致module lib 中的包编译时无法识别
今天写代码时用到了另一个lib型的工程,把它添加到dependencies后,在原工程中可以引用lib中的文件了,但是编译时就会报错,提示包不存在,后来在build.gradle中设置runProgu ...
- node.js报错throw err; // Rethrow non-MySQL errors e:\serverTest\node_modules\mysql\lib\protocol\Parser.js:79 解决方法
今天在用node+angular做后台时,需要使用session保存登陆状态的时候,遇到了此问题,问题直译为非mysql问题,我也在后台取到的登陆用户名和密码,确实不是数据库问题.最后发现在使用ses ...
- node 报错:Uncaught Error: Cannot find module "!!../../../node_modules/extract-webpack-plugin/loader.js
问题出在缺少less和less-loader 因为以上模块使用了less解析. 解决方法在dependencies添加 "less": "^2.7.1", & ...
- [已解决]报错: warning: LF will be replaced by CRLF in lib/anime.min.js
git config --global core.autocrlf false
- 微信小程序 TypeScript bug
微信小程序 TypeScript bug 执行自定义预览前预处理命令失败! internal/modules/cjs/loader.js:584 throw err; ^ Error: Cannot ...
- NPM 使用及npm升级中问题解决
NPM是随同NodeJS一起安装的包管理工具,能解决NodeJS代码部署上的很多问题,常见的使用场景有以下几种: 允许用户从NPM服务器下载别人编写的第三方包到本地使用. 允许用户从NPM服务器下载并 ...
随机推荐
- VS比较好用的扩展插件总结
1.Indent Guides 绝对是必须的,有了这些辅助线,代码结构一目了然. 2.CodeMaid 整理与优化代码,并且可以清除空行.必备 把if语句块for语句块折叠 工具->扩展和更新, ...
- CentOS 6 安装配置JDK+tomcat环境
1.安装OpenJDK 这里安装的OpenJDK,是开源版本的JDK,我们平时自己电脑上安装的是 Sun JDK(也叫Oracle JDK),OpenJDK可以看作Sun JDK的精简版. 如果想安装 ...
- 获取本机的ip地址(排除虚拟机,蓝牙等ip)
项目中遇到了要获取本地ip的需求,网上查找资料遇到很多坑,很多Java获取本机ip地址的方法要么是根本获取不到,要么是获取的有问题. 网上常见的方法如下 InetAddress.getLocalHos ...
- POJ1458(KB12-L LCS)
Common Subsequence Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 51319 Accepted: 21 ...
- Maven 那些破事
deploy 只上传了pom 晚上输命令,打算打包上传到本地库里,然后去服务器上部署新版本 mvn clean package deploy 结果看着mvn的build过程只是上传了pom,去库服务器 ...
- 使用ThinkPHP实现附件上传
刚学的使用ThinkPHP框架简单上传附件(图片,文档,视频等文件) 首先需要了解tp框架中Upload.class.php(ThinkPHP/Library/Think/Upload,class,p ...
- JS中undefined和null的区别,以及出现原因
区别:null是一个表示无的对象,转换为数值为0: undefined表示一个无的原始值,转化为数值为NAN(与任何数字相加也为NAN) undefined出现原因:(口诀:一变量二函数一对象) 1. ...
- 【代码笔记】iOS-自定义alertView
一,效果图. 二,代码. ViewController.h #import <UIKit/UIKit.h> @interface ViewController : UIViewContro ...
- @Schedul 中cron的命名规则
@Schedul注解的定时任务详解 1.springboot集成schedule由于Spring Schedule包含在spring-boot-starter基础模块中了,所有不需要增加额外的依赖. ...
- 记录搭建Odoo框架
一.获取 Odoo 源码 Odoo 是一个开源项目,我们可以轻松的在 Github 上找到它的源码.本次中使用的是 12.0 版本的 Odoo,所以在拉取代码时选择 12.0 的分支.确保拉取的速度, ...