blakeembrey / change-case

Convert strings between camelCase, PascalCase, Capital Case, snake_case and more
MIT License
2.21k stars 92 forks source link

Failing after upgrade to v5 #311

Closed llong2195 closed 8 months ago

llong2195 commented 8 months ago

Package has been working fine with v4.1.2

However, after upgrading to v5, I get the following error:

Error: No "exports" main defined in E:\backend\node_modules\change-case\package.json

My import command is just import { camelCase } from 'change-case'; which worked fine before.

minirepo: https://codesandbox.io/p/sandbox/long-leftpad-7hd63p?file=%2Fsrc%2Findex.js%3A1%2C43

pwa-tapptic commented 8 months ago

Same here, using "change-case": "^5.1.2"

blakeembrey commented 8 months ago

This package does not work with CommonJS any more. Please see the README or release notes for more information.