See: - [Why does typescript allow me to import dependencies it can't use at runtime?](https://stackoverflow.com/a/69322021/1123955) ## Solution ```sh npm install --save uuid npm install --save-dev @types/uuid ``` and ```ts import * as UUID from 'uuid' ``` See [my SO answer](https://stackoverflow.com/a/71643755/1123955)