Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node compatible? #26

Closed
JulianoBazzi opened this issue Jul 17, 2022 · 1 comment
Closed

Node compatible? #26

JulianoBazzi opened this issue Jul 17, 2022 · 1 comment

Comments

@JulianoBazzi
Copy link

I'm using NodeJS version 16.14.0 and when trying to use the package, I get the following error:
[ERROR] 16:41:35 Error: require() of ES Module C:\Git\Mercurius\Api\node_modules\round-to\index.js from C:\Git\Mercurius\Api\src\modules\dashboards\services\ResumeService.ts not supported. Instead change the require of index.js in C:\Git\Mercurius\Api\src\modules\dashboards\services\ResumeService.ts to a dynamic import() which is available in all CommonJS modules.

tsconfig.json:
{ "compilerOptions": { "target": "esnext", "module": "commonjs", "lib": ["ES6"], "allowJs": true, "strict": false, "strictPropertyInitialization": false, "outDir": "./dist", "rootDir": "./src", "baseUrl": ".", "paths": { "@config/*": ["./src/config/*"], "@modules/*": ["./src/modules/*"], "@shared/*": ["./src/shared/*"] }, "esModuleInterop": true, "resolveJsonModule": true, "experimentalDecorators": true, "emitDecoratorMetadata": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "removeComments": true }, "include": [ "src/**/*" ], "exclude": [ "node_modules" ] }

image

@sindresorhus
Copy link
Owner

sindresorhus commented Jul 17, 2022

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

@sindresorhus sindresorhus closed this as not planned Won't fix, can't repro, duplicate, stale Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants