运行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'的更多相关文章

  1. Error: Cannot find module '../lib/utils/unsupported.js'

    报错: nodejs : Error: Cannot find module '../lib/utils/unsupported.js' 解决办法(linux): 去node目录下:/node***/ ...

  2. Unexpected identifier in composer-common/lib/cardstore/businessnetworkcardstore.js:54

    c错误描述 Unexpected identifier in composer-common/lib/cardstore/businessnetworkcardstore.js:54 yo hyper ...

  3. 解决ImportError: No module named utils

    转载:https://blog.csdn.net/weixin_43979572/article/details/86159265 在Python中遇到了导包错误,其实包已经有了.原因是我再B文件的a ...

  4. Android runProguard配置 导致module lib 中的包编译时无法识别

    今天写代码时用到了另一个lib型的工程,把它添加到dependencies后,在原工程中可以引用lib中的文件了,但是编译时就会报错,提示包不存在,后来在build.gradle中设置runProgu ...

  5. node.js报错throw err; // Rethrow non-MySQL errors e:\serverTest\node_modules\mysql\lib\protocol\Parser.js:79 解决方法

    今天在用node+angular做后台时,需要使用session保存登陆状态的时候,遇到了此问题,问题直译为非mysql问题,我也在后台取到的登陆用户名和密码,确实不是数据库问题.最后发现在使用ses ...

  6. node 报错:Uncaught Error: Cannot find module "!!../../../node_modules/extract-webpack-plugin/loader.js

    问题出在缺少less和less-loader  因为以上模块使用了less解析. 解决方法在dependencies添加 "less": "^2.7.1", & ...

  7. [已解决]报错: warning: LF will be replaced by CRLF in lib/anime.min.js

    git config --global core.autocrlf false

  8. 微信小程序 TypeScript bug

    微信小程序 TypeScript bug 执行自定义预览前预处理命令失败! internal/modules/cjs/loader.js:584 throw err; ^ Error: Cannot ...

  9. NPM 使用及npm升级中问题解决

    NPM是随同NodeJS一起安装的包管理工具,能解决NodeJS代码部署上的很多问题,常见的使用场景有以下几种: 允许用户从NPM服务器下载别人编写的第三方包到本地使用. 允许用户从NPM服务器下载并 ...

随机推荐

  1. 关于ORA-12505, TNS:listener does not currently know of SID given in connect descriptor报错问题解决办法

    1.本机tnsnames.ora 配置如下 test4= (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.1 ...

  2. MySQL,Oracle,PostgreSQL,mongoDB,Hive, SAP HANA 数据库web维护客户端管理工具

    TreeDMS数据库管理系统使用JAVA开发,采用稳定通用的springMVC +JDBC架构,实现基于WEB方式对 MySQL,Oracle,PostgreSQL,mongoDB ,Hive, SA ...

  3. 把多个js函数绑定到onload时间处理函数上

    js的window.onload=function();网页加载完毕时会触发一个onload事件,这个事件与window对象相关联,是让一个函数在网页加载完毕之后得到执行.但是如果有两个韩式first ...

  4. Linux常用基本命令(file,chown)

    1,file命令作用,查看文件的类型 ghostwu@dev:~$ .htm ./linux/rename ghostwu@dev:~$ .htm ./linux/rename/.htm: empty ...

  5. tar.xz文件的解压

    xz是绝大数linux默认就带的一个压缩工具. 压缩包xz格式的居然比7z还要小. 不过xz也有一个坏处就是压缩时间比较长,比7z压缩时间还长一些.不过压缩是一次性的,所以可以忽略. xz压缩文件方法 ...

  6. python网络爬虫抓取动态网页并将数据存入数据库MySQL

    简述以下的代码是使用python实现的网络爬虫,抓取动态网页 http://hb.qq.com/baoliao/ .此网页中的最新.精华下面的内容是由JavaScript动态生成的.审查网页元素与网页 ...

  7. linux学习笔记-目录结构(1)

    每个linux系统的目录结构差不多,因为有FHS(Filesystem Hierarchy Standard)标准的规范. FHS的重点在于规范每个特定的目录下应该要放什么样的数据. FHS依据文件系 ...

  8. JPA命名规则

    jpa中方法的命名规则必须按照严格的要求来写.不能随便的命名方法名字,具体的方法操作如下. 参照方法地址:https://blog.csdn.net/csdnchen666666/article/de ...

  9. js多线程(worker)

    浏览器端js是单线程执行,所以当js执行高负载运算时,UI渲染就会阻塞,页面就会出现卡顿,用户体验就不是很好 js为此也提供了异步操作,例如: 定时器(setTimeout 和 setInterval ...

  10. 存折打印机测量和毫米方式Form配置说明

    一.打印一把尺子(单位:mm) 存折打印机测试程序:D:\Inspur\InspXfs\Bin\InspPassbook\NuDevPassbookTest.exe .) 二.测量存折(横向和纵向) ...