Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

this was a joke comment in the morning.. but actually just turned out to be an issue now. Was installing nanoid in a project using commonJS and typescript.. all jest tests suddenly failed. So I looked into jest.config - did I need to change something in terms of transpilation? or some new babbel config? some other secret flag somewhere? no, because turns out that

npm install nanoid Nano ID 5 works only with ESM projects, in tests or Node.js scripts. For CommonJS you need Nano ID 3.x (we still support it):

This whole module bit in node has been a total disaster. Incredibly frustrating



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: