sindresorhus/round-to

Node compatible? #26

JulianoBazzi posted onGitHub

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


Fund this Issue

$0.00
Funded

Pull requests