Cannot find module '../lib/utils/unsupported.js'
2024-08-24 17:56:48
运行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
最新文章
- nios II--实验4——按键中断硬件部分
- linux 下 zip unzip压缩与解压
- Asp.net设计模式笔记之一:理解设计模式
- 关闭微软对win10的推送
- HLG 1400 汽车比赛
- angularjs 将带标签的内容解析后返回
- 在.NET MVC下不用iframe实现局部加载html
- MATLAB快速注释方法
- 玩转web之servlet(六)---session介绍及简单使用(登录验证中保存信息)
- 企业架构研究总结(44)——企业架构与建模之Archimate视图和视角
- Windows应用程序要点
- Intellij IDEA快捷键(必备)
- Netty中的连接管理
- Oarcle之单行函数(上)
- aop (权限控制之功能权限)
- unity 常用插件 2
- 一个真实的Async/Await示例
- vue组件内部引入远程js文件
- 使用GeoServer导出地图数据GeoJSON并应用
- 155. Min Stack - Unsolved
热门文章
- Spring是什么 包括SpringBean SpringMVC SpringBoot SpringCloud
- Redraw Beautiful Drawings(hdu4888)网络流+最大流
- A计划 hdu2102(bfs一般题)
- Java - HashMap 多线程安全解析
- javax.net.ssl.SSLHandshakeException sun.security.validator.ValidatorException PK
- AsnycLocal与ThreadLocal
- promise 拙见
- @Transactional事务不起作用原因
- Nginx的站点目录及文件URL的访问控制
- SQLServer&#160;常见SQL函数