How can I configure npm to use Windows-style line endings in package.json?

僤鯓⒐⒋嵵緔 提交于 2019-11-30 11:09:09

Update: The even easier fix is to use npm@5.8.0 or newer.

Assuming Git, the easiest "solution" to this problem is to use a .gitattributes file to specify that package.json (and now package-lock.json) should always use LF:

# .gitattributes in project root
package.json text eol=lf
package-lock.json text eol=lf
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!