我正在将 SPA 部署到生产服务器并意外进入npm urn build了命令 shell。我注意到我的拼写错误,预计 npm 会抛出错误,但它还是构建了该项目。
看起来 npm 开发者为这样的错误做了一些准备。这背后的原因/历史是什么?
NPM 使用Levenshtein 距离算法来查找相似的命令。请参阅https://github.com/npm/cli/blob/latest/lib/utils/did-you-mean.js。
于 2018 年 6 月 28 日实施。请参阅https://github.com/npm/cli/commits/latest/lib/utils/did-you-mean.js。
| 归档时间: |
|
| 查看次数: |
848 次 |
| 最近记录: |