Describe the bug
When running nx build , it runs into the following error.
error: Browser build cannot require() Node.js builtin: "tls". To use Node.js builtins, set target to 'node' or 'bun'
const tls_1 = require("tls");
^
.../node_modules/ioredis/built/connectors/SentinelConnector/index.js:6:23 204
error: Browser build cannot require() Node.js builtin: "dns". To use Node.js builtins, set target to 'node' or 'bun'
const dns_1 = require("dns");
^
.../node_modules/ioredis/built/cluster/ClusterOptions.js:4:23 141
error: Browser build cannot require() Node.js builtin: "tls". To use Node.js builtins, set target to 'node' or 'bun'
const tls_1 = require("tls");
Describe the bug When running nx build, it runs into the following error.
To Reproduce
NX Configuration
Project compiler options
Project build config
Changing the target to node/bun has no impact
Expected behavior
Additional context
bun build --target=bun ./packages/agenda/src/main.ts --outdir ./dist/packages/agenda
generates the right build