Web/Node.js & Nest.js

@nestjs/typeorm에서 ReferenceError: crypto is not defined 오류

코딩은 내 밥줄 2025. 1. 29. 22:46

backend/node_modules/@nestjs/typeorm/dist/common/typeorm.utils.js:123 const generateString = () => crypto.randomUUID(); ^ ReferenceError: crypto is not defined at generateString (backend/node_modules/@nestjs/typeorm/dist/common/typeorm.utils.js:123:37)

 

내가쓰는 node버전이 18인데 해당 버전은 crypto을 지원하지 않아서 오류가 발생했다

20버전으로 바꾸니 잘 된다.

nvm install 20

nvm use 20

 

https://github.com/WalletConnect/walletconnect-utils/pull/208

 

fix(ci): resolve CI issues, npm audit fix, simplify dep management by bkrem · Pull Request #208 · WalletConnect/walletconnect-

Context The package-level lockfiles are redundant as the root level one is the authoritative lockfile, and we do not bundle lockfiles into our vendored packages, i.e. they're not consumed by p...

github.com