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服务器下载并 ...
随机推荐
- ElasticSearch 使用小结
写在前面 要做个元数据服务,包括存储和查询.元数据除了一些基本字段外,其他格式是自由的,存储输入为一个JSON形式.比如下面是一个文件对象的元数据: { "name":" ...
- 5月7日——采用第三方页面内容,但是顶部title使用自己的
---------> 由A页面进入我的页面 代码如下: (1)A页面下需要添加的代码 (2)我的页面下需要添加的代码 此处用到的语法为mui框架中的语法,可参照mui官方 ...
- 4.SSM配置shiro权限管理
作者QQ:1095737364 QQ群:123300273 欢迎加入! 1.搭建SSM项目: http://www.cnblogs.com/yysbolg/p/6909021.html ...
- [USACO18FEB]Slingshot
题意可化为: 在二维平面中有n个点,坐标为\((x_i,y_i)\),点权为\(t_i\). 现有m个询问,每次给定点\((x,y)\),求\(\min\{|x-x_i|+|y-y_i|+t_i,|y ...
- SQLServer 2008(R2)如何开启数据库的远程连接
SQL Server 2008 R2如何开启数据库的远程连接 by:授客 QQ:1033553122 SQL Server 2008默认是不允许远程连接的,如果想要在本地用SSMS连接远程服务器上的S ...
- Wireshark wireshake数据包分割及捕包过滤器介绍
wireshake数据包分割及捕包过滤器介绍 by:授客 QQ:1033553122 wireshake自带工具editcap分割数据包 操作: 进入到目录,然后 editcap.exe -c < ...
- (Stanford CS224d) Deep Learning and NLP课程笔记(二):word2vec
本节课将开始学习Deep NLP的基础--词向量模型. 背景 word vector是一种在计算机中表达word meaning的方式.在Webster词典中,关于meaning有三种定义: the ...
- 【SPL标准库专题(4)】 Datastructures:SplDoublyLinkedList
简述 双链表是一种重要的线性存储结构,对于双链表中的每个节点,不仅仅存储自己的信息,还要保存前驱和后继节点的地址. 类摘要 SplDoublyLinkedList implements Iterato ...
- sql server 用户'sa'登录失败(错误18456)
转载于:http://thenear.blog.51cto.com/4686262/865544 用户'sa'登录失败(错误18456)解决方案图解 当我们在使用sql server 的时候可 ...
- Oracle EBS AR 冲销收款
DECLARE L_CR_ID NUMBER; L_ATTRIBUTE_REC AR_RECEIPT_API_PUB.ATTRIBUTE_REC_TYPE; L_GLOBAL_ATT_REC AR_R ...