Closed aminlatifi closed 1 year ago
Add "module": "node16", "moduleResolution": "node16" to your tsconfig.json. (Example)
reporting same issue as @aminlatifi attempt to modify tsconfig as recommended did not resolve the issue.
facing same issue..
There's this resource that can help as well https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
By importing lowdb in my typescript project I get below error
Related dependencies:
ts-node: "^10.9.1", typescript: "^4.9.3", Nodejs 16
tsconfig: ... "module": "commonjs" / Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. /, "lib": [ / Specify library files to be included in the compilation. / "es2018", "es2019", "esnext.asynciterable" ], ....
setting
type:module
in package.json didn't solve the problem