一、问题
今天在运行npm时候一直出项sill idealTree buildDeps问题

二、 解决
1、网上查了一下,有网友说先删除用户界面下的npmrc文件(注意一定是用户C:\Users\{账户}\下的.npmrc文件下不是nodejs里面),进入到对应目录下,Mac启动显示隐藏文件操作(Command+Shift+".")也没有发现有这个.npmrc目录

2、打开一个终端,输入下面命令以后才能出现这个文件目录,执行以后就出现上面这个.npmrc目录了
npm config get userconfig

3、 删除后使用下面命令清除缓存
npm cache verify

4、你可能还需要重新设置镜像地址,下面几个镜像地址你都分别试一下,这里我是设置了国外原来镜像地址有用
// 国内淘宝镜像地址
npm config set registry https://registry.npm.taobao.org
// 华为镜像地址
npm config set registry https://mirrors.huaweicloud.com/repository/npm/
// 国外原来镜像地址
npm config set registry https://registry.npmmirror.com
5、查看是否设置成功
npm config get registry

6、重新执行npm install命令(这里我是在VSCode中的终端执行的),终于成功了

7、继续执行npm run dev,如果出现Error: error:0308010C:digital envelope routines::unsupported
那么你可以执行下面的命令解决

// Linux & Mac OS:
export NODE_OPTIONS=--openssl-legacy-provider
// Windows:
set NODE_OPTIONS=--openssl-legacy-provider
8、继续运行npm run dev命令
最后终于成功运行成功了,感谢你的阅读和学习,我们下篇再见!