sindresorhus/public-ip

Error when compiling the application in nestjs

Closed this issue · 1 comments

When installing this library in nestjs an error occurs, the application is not allowed to compile, the error occurs when the dist folder is created

/workspaces/test-public-ip/project/dist/app.service.js:12
const public_ip_1 = require("public-ip");

Error [ERR_REQUIRE_ESM]: require() of ES Module
Instead change the require of index.js in /workspaces/test-public-ip/project/dist/app.service.js to a dynamic import() which is available in all CommonJS modules.