DenoDDeno
Powered by
ня, приветН
Deno•3y ago
ня, привет

global is not defined

Why Deno doesn't have global like node.js? There is globalThis, but some things from npm packages are based exactly on global, which can cause problems (as it happened to me)

This happened to me when I tried to use the Array type from mongoose (import { Types } from "mongoose"). This is an extended version of array, which inherits an array from global.Array, which works in deno as an inheritance from undefined
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

`global` is not defined
duesabatiDduesabati / help
16mo ago
Deno is not defined
jsJjs / help
2y ago
ReferenceError: HTMLElement is not defined
AnotherParsleyAgainAAnotherParsleyAgain / help
3y ago
[react] document is not defined
JordanJJordan / help
4y ago