Current Behavior:
package-lock and package.json order is different when used non English (Czech) locale
Expected Behavior:
Sorting should be locale-agnostic to not change package-lock JSON back and forth.
Steps To Reproduce:
- Clone repo created with English locale
- Run npm install
- I see different order for packages with
ch in name (eg. chai)
Environment:
- OS: macOS 11.2.2
- Node: 14.16.0
- npm: 7.6.1
It looks like similar problem as it's reported here
npm/npm#17048
I think the root cause is different order of letters. In Czech alphabet CH letter stands after H, but in English alphabet it's just C.
Example in package.json (left is Czech locale, right is English)

Workaround
If someone is facing the same issue in can be fixed by defining alias alias npm='LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" npm' in bash_profile/.zshrc or similar file depends to shell you are using.
Current Behavior:
package-lock and package.json order is different when used non English (Czech) locale
Expected Behavior:
Sorting should be locale-agnostic to not change package-lock JSON back and forth.
Steps To Reproduce:
chin name (eg. chai)Environment:
It looks like similar problem as it's reported here
npm/npm#17048
I think the root cause is different order of letters. In Czech alphabet
CHletter stands afterH, but in English alphabet it's justC.Example in package.json (left is Czech locale, right is English)
Workaround
If someone is facing the same issue in can be fixed by defining alias
alias npm='LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" npm'in bash_profile/.zshrc or similar file depends to shell you are using.