npm install 报错 npm ERR! Error while executing:

npm install 报错 npm ERR! Error while executing:_第1张图片

npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://[email protected]/sohee-lee7/Squire.git
npm ERR!
npm ERR! ssh: Could not resolve hostname github.com: Name or service not known
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2023-12-15T03_27_10_712Z-debug.log

一、删除markdown相关的内容

1) 删除项目根目录下的package.json中的"tui-editor"依赖

npm install 报错 npm ERR! Error while executing:_第2张图片

2)删除MarkdownEditor组件文件夹

npm install 报错 npm ERR! Error while executing:_第3张图片

3)删除src/views/components-demo/markdown.vue文件

npm install 报错 npm ERR! Error while executing:_第4张图片

4)删除组件路由,打开src/router/modules/components.js文件,删除markdown的路由配置,如下图

npm install 报错 npm ERR! Error while executing:_第5张图片

二、强制清空缓存

npm cache clean --force

三、重新安装依赖

npm install --registry=https://registry.npm.taobao.org

安装依赖完成就可以进行开发了

四、运行项目

npm run dev

npm install 报错 npm ERR! Error while executing:_第6张图片

你可能感兴趣的:(npm,前端,node.js,npm,install,npm,报错)