# npm install 因 package.json 配置错误而失败

**URL:** <https://meta.discourse.org/t/npm-install-fails-due-to-package-json-misconfiguration/101193>\
**Category:** Development\
**Created:** [2018 年11 月 3 日 09:31 UTC](https://meta.discourse.org/t/npm-install-fails-due-to-package-json-misconfiguration/101193 "2018-11-03T09:31:37Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

作者： ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
发布日期： [2018 年11 月 5 日 01:58 UTC](https://meta.discourse.org/t/npm-install-fails-due-to-package-json-misconfiguration/101193/5 "2018-11-05T01:58:50Z")

</div>

I think the error you’re getting is due to our `package.json` using yarn syntax for referencing Github versions of dependencies. So, use `yarn install` instead of npm. Also, `yarn install` is only required for running frontend (qunit) tests or when a developer is upgrading one of the Discourse dependencies listed in `package.json`.

---

_[View the full topic](https://meta.discourse.org/t/npm-install-fails-due-to-package-json-misconfiguration/101193)._
