npm install命令运行中出现Error: ENOENT: no such file or directory解决方法

在开发过程中执行下面脚本出现错误

npm install --save ng-bootstrap/ng-bootstrap

出现

Error: ENOENT: no such file or directory, open 'D:\aa\node_modules\ng-bootstrap\.git\hooks\commit-msg'
    at Object.fs.openSync (fs.js:653:18)
    at Object.fs.writeFileSync (fs.js:1300:33)
    at Object.<anonymous> (D:\projects\testb\node_modules\ng-bootstrap\misc\validate-commit.install.js:10:6)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:201:16)

采用了多种方法包括清除cache都没有办法解决,后来采用直接在package.json直接添加
==dependencies==中增加=="@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.5"==,添加好之后再执行

npm install

就解决些问题

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 136,064评论 19 139
  • 发现 关注 消息 iOS 第三方库、插件、知名博客总结 作者大灰狼的小绵羊哥哥关注 2017.06.26 09:4...
    肇东周阅读 14,589评论 4 61
  • Spring Boot 参考指南 介绍 转载自:https://www.gitbook.com/book/qbgb...
    毛宇鹏阅读 47,133评论 6 342
  • 人生就像赶路, 山一程,水一程, 一路风雨兼程,一路披荆斩棘, 往前看,人生仿佛遥不可及, 往后看,却又咫尺可量。...
    文艺小麦阅读 4,507评论 0 3
  • 文/娜娜 从西岸走到东岸,从北边走到南边。 从冬天走到春天,从人间走到云端。 永不停止的脚步,践行生命的质感。 天...
    何娜娜GL阅读 1,486评论 6 1

友情链接更多精彩内容