You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rewriting my issue from #23882 as requested, since it was bloated.
Trying to use Deno 2.1.4 with Vitest 2.1.8 in a monorepo produces a strange error.
The monorepo (nx) is roughly as follows:
apps/
node-app1/
node-app2/
deno-app/
functions/
deno.json, deno.lock...
node_modules
libs/
shared/src/...
node_modules/
package.json, package-lock.json
When i run deno task --unstable-detect-cjs --unstable-sloppy-imports --unstable-node-globals test-vitest run inside the deno-app folder, i get the following error:
FAIL functions/_tests/vitest.example.test.ts [ functions/_tests/vitest.example.test.ts ]
ReferenceError: exports is not defined
❯ ../../node_modules/redis/dist/index.js:16:23
14|for(var pin m) if (p !== "default"&&!Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15| };
16| Object.defineProperty(exports, "__esModule", { value: true });| ^
17| exports.createCluster = exports.createClient = void 0;
18| const client_1 = require("@redis/client");
The error is related to node-redis package. I am not actually using node-redis as it is not compatible with Deno, though I have to keep it because my node apps use it. Also, the error indicates that Deno detects it from the node_modules outside the deno app, not the one inside the deno-app. The root node_modules is only for the node apps, and i don't reference anything there from deno-app.
Rewriting my issue from #23882 as requested, since it was bloated.
Trying to use Deno 2.1.4 with Vitest 2.1.8 in a monorepo produces a strange error.
The monorepo (nx) is roughly as follows:
When i run
deno task --unstable-detect-cjs --unstable-sloppy-imports --unstable-node-globals test-vitest run
inside the deno-app folder, i get the following error:The error is related to node-redis package. I am not actually using node-redis as it is not compatible with Deno, though I have to keep it because my node apps use it. Also, the error indicates that Deno detects it from the node_modules outside the deno app, not the one inside the deno-app. The root node_modules is only for the node apps, and i don't reference anything there from deno-app.
deno.json
import_map.json:
vite.config.mts
The text was updated successfully, but these errors were encountered: