diff --git a/.changeset/lucky-sheep-taste.md b/.changeset/lucky-sheep-taste.md
new file mode 100644
index 0000000000000000000000000000000000000000..adef8040e7ab240b44d1cdb58ff919157d97b2f9
--- /dev/null
+++ b/.changeset/lucky-sheep-taste.md
@@ -0,0 +1,6 @@
+---
+"llamaindex": patch
+"@llamaindex/env": patch
+---
+
+fix: compatibility issue with Deno
diff --git a/.gitignore b/.gitignore
index 3e17caf04ec627162858e41a93d680b590db2e77..8f37f7c04cd5f7a55a0934350827511c5ab03208 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,6 +44,7 @@ test-results/
 playwright-report/
 blob-report/
 playwright/.cache/
+.tsbuildinfo
 
 # intellij
 **/.idea
diff --git a/packages/core/jsr.json b/packages/core/jsr.json
new file mode 100644
index 0000000000000000000000000000000000000000..41e21f3ed54f6671313c0c1f45a9a9f5ff740e9b
--- /dev/null
+++ b/packages/core/jsr.json
@@ -0,0 +1,8 @@
+{
+  "name": "@llamaindex/core",
+  "version": "0.1.19",
+  "exports": "./src/index.ts",
+  "imports": {
+    "@llamaindex/env": "jsr:@llamaindex/env@0.0.4"
+  }
+}
diff --git a/packages/core/src/cloud/utils.ts b/packages/core/src/cloud/utils.ts
index 69a80861f8615497a36e1167fce568eb3a6a4cf0..323e622fb045e9295bbd9063657c0ece497379e2 100644
--- a/packages/core/src/cloud/utils.ts
+++ b/packages/core/src/cloud/utils.ts
@@ -1,4 +1,5 @@
 import type { PlatformApiClient } from "@llamaindex/cloud";
+import { getEnv } from "@llamaindex/env";
 import type { ClientParams } from "./types.js";
 import { DEFAULT_BASE_URL } from "./types.js";
 
@@ -7,8 +8,8 @@ export async function getClient({
   baseUrl,
 }: ClientParams = {}): Promise<PlatformApiClient> {
   // Get the environment variables or use defaults
-  baseUrl = baseUrl ?? process.env.LLAMA_CLOUD_BASE_URL ?? DEFAULT_BASE_URL;
-  apiKey = apiKey ?? process.env.LLAMA_CLOUD_API_KEY;
+  baseUrl = baseUrl ?? getEnv("LLAMA_CLOUD_BASE_URL") ?? DEFAULT_BASE_URL;
+  apiKey = apiKey ?? getEnv("LLAMA_CLOUD_API_KEY");
 
   const { PlatformApiClient } = await import("@llamaindex/cloud");
 
diff --git a/packages/core/src/embeddings/fireworks.ts b/packages/core/src/embeddings/fireworks.ts
index 651e3919b1e7b2dbef28ede8d6f15f6002b0d0f8..a48039e1022e91c06561e08937a02b39bc3f5e7e 100644
--- a/packages/core/src/embeddings/fireworks.ts
+++ b/packages/core/src/embeddings/fireworks.ts
@@ -1,9 +1,10 @@
+import { getEnv } from "@llamaindex/env";
 import { OpenAIEmbedding } from "./OpenAIEmbedding.js";
 
 export class FireworksEmbedding extends OpenAIEmbedding {
   constructor(init?: Partial<OpenAIEmbedding>) {
     const {
-      apiKey = process.env.FIREWORKS_API_KEY,
+      apiKey = getEnv("FIREWORKS_API_KEY"),
       additionalSessionOptions = {},
       model = "nomic-ai/nomic-embed-text-v1.5",
       ...rest
diff --git a/packages/core/src/embeddings/together.ts b/packages/core/src/embeddings/together.ts
index 4c2ca91c671a3a1325667004882b81e0ee0fc544..b284daf6a701fe42000b3184dfc68c5f62d7e127 100644
--- a/packages/core/src/embeddings/together.ts
+++ b/packages/core/src/embeddings/together.ts
@@ -1,9 +1,10 @@
+import { getEnv } from "@llamaindex/env";
 import { OpenAIEmbedding } from "./OpenAIEmbedding.js";
 
 export class TogetherEmbedding extends OpenAIEmbedding {
   constructor(init?: Partial<OpenAIEmbedding>) {
     const {
-      apiKey = process.env.TOGETHER_API_KEY,
+      apiKey = getEnv("TOGETHER_API_KEY"),
       additionalSessionOptions = {},
       model = "togethercomputer/m2-bert-80M-32k-retrieval",
       ...rest
diff --git a/packages/core/src/llm/anthropic.ts b/packages/core/src/llm/anthropic.ts
index a8dd6c1145f192563df7d4a146f4d2f0ab22f1fa..629e3335caa3b1b6de960c9989c8c4e0ed73bf42 100644
--- a/packages/core/src/llm/anthropic.ts
+++ b/packages/core/src/llm/anthropic.ts
@@ -1,5 +1,6 @@
 import type { ClientOptions } from "@anthropic-ai/sdk";
 import Anthropic, { AI_PROMPT, HUMAN_PROMPT } from "@anthropic-ai/sdk";
+import { getEnv } from "@llamaindex/env";
 import _ from "lodash";
 
 export class AnthropicSession {
@@ -7,9 +8,7 @@ export class AnthropicSession {
 
   constructor(options: ClientOptions = {}) {
     if (!options.apiKey) {
-      if (typeof process !== undefined) {
-        options.apiKey = process.env.ANTHROPIC_API_KEY;
-      }
+      options.apiKey = getEnv("ANTHROPIC_API_KEY");
     }
 
     if (!options.apiKey) {
diff --git a/packages/core/src/llm/azure.ts b/packages/core/src/llm/azure.ts
index 2bcd11bcbb2565c27dd9a0976343f4f453594737..36b90e5413ede4ec169e099426dafad64d54b5d2 100644
--- a/packages/core/src/llm/azure.ts
+++ b/packages/core/src/llm/azure.ts
@@ -1,3 +1,5 @@
+import { getEnv } from "@llamaindex/env";
+
 export interface AzureOpenAIConfig {
   apiKey?: string;
   endpoint?: string;
@@ -67,24 +69,24 @@ export function getAzureConfigFromEnv(
   return {
     apiKey:
       init?.apiKey ??
-      process.env.AZURE_OPENAI_KEY ?? // From Azure docs
-      process.env.OPENAI_API_KEY ?? // Python compatible
-      process.env.AZURE_OPENAI_API_KEY, // LCJS compatible
+      getEnv("AZURE_OPENAI_KEY") ?? // From Azure docs
+      getEnv("OPENAI_API_KEY") ?? // Python compatible
+      getEnv("AZURE_OPENAI_API_KEY"), // LCJS compatible
     endpoint:
       init?.endpoint ??
-      process.env.AZURE_OPENAI_ENDPOINT ?? // From Azure docs
-      process.env.OPENAI_API_BASE ?? // Python compatible
-      process.env.AZURE_OPENAI_API_INSTANCE_NAME, // LCJS compatible
+      getEnv("AZURE_OPENAI_ENDPOINT") ?? // From Azure docs
+      getEnv("OPENAI_API_BASE") ?? // Python compatible
+      getEnv("AZURE_OPENAI_API_INSTANCE_NAME"), // LCJS compatible
     apiVersion:
       init?.apiVersion ??
-      process.env.AZURE_OPENAI_API_VERSION ?? // From Azure docs
-      process.env.OPENAI_API_VERSION ?? // Python compatible
-      process.env.AZURE_OPENAI_API_VERSION ?? // LCJS compatible
+      getEnv("AZURE_OPENAI_API_VERSION") ?? // From Azure docs
+      getEnv("OPENAI_API_VERSION") ?? // Python compatible
+      getEnv("AZURE_OPENAI_API_VERSION") ?? // LCJS compatible
       DEFAULT_API_VERSION,
     deploymentName:
       init?.deploymentName ??
-      process.env.AZURE_OPENAI_DEPLOYMENT ?? // From Azure docs
-      process.env.AZURE_OPENAI_API_DEPLOYMENT_NAME ?? // LCJS compatible
+      getEnv("AZURE_OPENAI_DEPLOYMENT") ?? // From Azure docs
+      getEnv("AZURE_OPENAI_API_DEPLOYMENT_NAME") ?? // LCJS compatible
       init?.model, // Fall back to model name, Python compatible
   };
 }
@@ -113,8 +115,8 @@ export function getAzureModel(openAIModel: string) {
 
 export function shouldUseAzure() {
   return (
-    process.env.AZURE_OPENAI_ENDPOINT ||
-    process.env.AZURE_OPENAI_API_INSTANCE_NAME ||
-    process.env.OPENAI_API_TYPE === "azure"
+    getEnv("AZURE_OPENAI_ENDPOINT") ||
+    getEnv("AZURE_OPENAI_API_INSTANCE_NAME") ||
+    getEnv("OPENAI_API_TYPE") === "azure"
   );
 }
diff --git a/packages/core/src/llm/fireworks.ts b/packages/core/src/llm/fireworks.ts
index f6ad6b7132f1bf467c1fd67ce5cb88a21a013ec9..8621dd01f0057e5cf470bf0f7e36c199dc98f599 100644
--- a/packages/core/src/llm/fireworks.ts
+++ b/packages/core/src/llm/fireworks.ts
@@ -1,9 +1,10 @@
+import { getEnv } from "@llamaindex/env";
 import { OpenAI } from "./LLM.js";
 
 export class FireworksLLM extends OpenAI {
   constructor(init?: Partial<OpenAI>) {
     const {
-      apiKey = process.env.FIREWORKS_API_KEY,
+      apiKey = getEnv("FIREWORKS_API_KEY"),
       additionalSessionOptions = {},
       model = "accounts/fireworks/models/mixtral-8x7b-instruct",
       ...rest
diff --git a/packages/core/src/llm/groq.ts b/packages/core/src/llm/groq.ts
index 0d287f56d1c9afa08349c9f8113ecd8fd1dd090e..b294317496eb3feef8fcb747f0cea0fc612fb305 100644
--- a/packages/core/src/llm/groq.ts
+++ b/packages/core/src/llm/groq.ts
@@ -1,9 +1,10 @@
+import { getEnv } from "@llamaindex/env";
 import { OpenAI } from "./LLM.js";
 
 export class Groq extends OpenAI {
   constructor(init?: Partial<OpenAI>) {
     const {
-      apiKey = process.env.GROQ_API_KEY,
+      apiKey = getEnv("GROQ_API_KEY"),
       additionalSessionOptions = {},
       model = "mixtral-8x7b-32768",
       ...rest
diff --git a/packages/core/src/llm/mistral.ts b/packages/core/src/llm/mistral.ts
index 47478ca5bf6e016da6849f8d8e1dd82d8d3affc1..3de5c0898ef404f46f3484980327d28a13698052 100644
--- a/packages/core/src/llm/mistral.ts
+++ b/packages/core/src/llm/mistral.ts
@@ -1,3 +1,4 @@
+import { getEnv } from "@llamaindex/env";
 import type {
   CallbackManager,
   Event,
@@ -27,9 +28,7 @@ export class MistralAISession {
     if (init?.apiKey) {
       this.apiKey = init?.apiKey;
     } else {
-      if (typeof process !== undefined) {
-        this.apiKey = process.env.MISTRAL_API_KEY;
-      }
+      this.apiKey = getEnv("MISTRAL_API_KEY");
     }
     if (!this.apiKey) {
       throw new Error("Set Mistral API key in MISTRAL_API_KEY env variable"); // Overriding MistralAI package's error message
diff --git a/packages/core/src/llm/open_ai.ts b/packages/core/src/llm/open_ai.ts
index 9deaffbdea1a75d533eb5def4dafc490bf16c9ba..336844aaa35dc178e358310ce41d73b3b30c569c 100644
--- a/packages/core/src/llm/open_ai.ts
+++ b/packages/core/src/llm/open_ai.ts
@@ -1,3 +1,4 @@
+import { getEnv } from "@llamaindex/env";
 import _ from "lodash";
 import type { ClientOptions } from "openai";
 import OpenAI from "openai";
@@ -13,9 +14,7 @@ export class OpenAISession {
 
   constructor(options: ClientOptions & { azure?: boolean } = {}) {
     if (!options.apiKey) {
-      if (typeof process !== undefined) {
-        options.apiKey = process.env.OPENAI_API_KEY;
-      }
+      options.apiKey = getEnv("OPENAI_API_KEY");
     }
 
     if (!options.apiKey) {
diff --git a/packages/core/src/llm/portkey.ts b/packages/core/src/llm/portkey.ts
index 9d47e979efb5c9e66e196015249c96b7b2aa852f..d0d90253e187440b0575421dcc99bf5f784542e7 100644
--- a/packages/core/src/llm/portkey.ts
+++ b/packages/core/src/llm/portkey.ts
@@ -1,17 +1,8 @@
+import { getEnv } from "@llamaindex/env";
 import _ from "lodash";
 import type { LLMOptions } from "portkey-ai";
 import { Portkey } from "portkey-ai";
 
-export const readEnv = (
-  env: string,
-  default_val?: string,
-): string | undefined => {
-  if (typeof process !== "undefined") {
-    return process.env?.[env] ?? default_val;
-  }
-  return default_val;
-};
-
 interface PortkeyOptions {
   apiKey?: string;
   baseURL?: string;
@@ -24,11 +15,11 @@ export class PortkeySession {
 
   constructor(options: PortkeyOptions = {}) {
     if (!options.apiKey) {
-      options.apiKey = readEnv("PORTKEY_API_KEY");
+      options.apiKey = getEnv("PORTKEY_API_KEY");
     }
 
     if (!options.baseURL) {
-      options.baseURL = readEnv("PORTKEY_BASE_URL", "https://api.portkey.ai");
+      options.baseURL = getEnv("PORTKEY_BASE_URL") ?? "https://api.portkey.ai";
     }
 
     this.portkey = new Portkey({});
diff --git a/packages/core/src/llm/replicate_ai.ts b/packages/core/src/llm/replicate_ai.ts
index d452df38e63760b803ea94c39271467fb44bed9c..5c3d51f5602c72eee461a6cf5cf76c6915fa7f85 100644
--- a/packages/core/src/llm/replicate_ai.ts
+++ b/packages/core/src/llm/replicate_ai.ts
@@ -1,3 +1,4 @@
+import { getEnv } from "@llamaindex/env";
 import Replicate from "replicate";
 
 export class ReplicateSession {
@@ -7,8 +8,8 @@ export class ReplicateSession {
   constructor(replicateKey: string | null = null) {
     if (replicateKey) {
       this.replicateKey = replicateKey;
-    } else if (process.env.REPLICATE_API_TOKEN) {
-      this.replicateKey = process.env.REPLICATE_API_TOKEN;
+    } else if (getEnv("REPLICATE_API_TOKEN")) {
+      this.replicateKey = getEnv("REPLICATE_API_TOKEN") as string;
     } else {
       throw new Error(
         "Set Replicate token in REPLICATE_API_TOKEN env variable",
diff --git a/packages/core/src/llm/together.ts b/packages/core/src/llm/together.ts
index 96df3cef870e7fda19e419d87bcd18db0a9a37bc..65651cdf72dc5521e02528dd265d2108ee358e99 100644
--- a/packages/core/src/llm/together.ts
+++ b/packages/core/src/llm/together.ts
@@ -1,9 +1,10 @@
+import { getEnv } from "@llamaindex/env";
 import { OpenAI } from "./LLM.js";
 
 export class TogetherLLM extends OpenAI {
   constructor(init?: Partial<OpenAI>) {
     const {
-      apiKey = process.env.TOGETHER_API_KEY,
+      apiKey = getEnv("TOGETHER_API_KEY"),
       additionalSessionOptions = {},
       model = "togethercomputer/llama-2-7b-chat",
       ...rest
diff --git a/packages/core/src/readers/AssemblyAIReader.ts b/packages/core/src/readers/AssemblyAIReader.ts
index b038ce2201df5d43256fe23fd9575b33bdae6661..4a128b5c813ebbd68a29151d85a895584aabc65b 100644
--- a/packages/core/src/readers/AssemblyAIReader.ts
+++ b/packages/core/src/readers/AssemblyAIReader.ts
@@ -1,3 +1,4 @@
+import { getEnv } from "@llamaindex/env";
 import type {
   BaseServiceParams,
   SubtitleFormat,
@@ -28,7 +29,7 @@ abstract class AssemblyAIReader implements BaseReader {
       options = {};
     }
     if (!options.apiKey) {
-      options.apiKey = process.env.ASSEMBLYAI_API_KEY;
+      options.apiKey = getEnv("ASSEMBLYAI_API_KEY");
     }
     if (!options.apiKey) {
       throw new Error(
diff --git a/packages/core/src/readers/LlamaParseReader.ts b/packages/core/src/readers/LlamaParseReader.ts
index 70deec7694955f3d8593a2afa7420e984d3076f7..066f88bee25d7f91d55fba335c29097d077afca7 100644
--- a/packages/core/src/readers/LlamaParseReader.ts
+++ b/packages/core/src/readers/LlamaParseReader.ts
@@ -1,5 +1,4 @@
-import type { GenericFileSystem } from "@llamaindex/env";
-import { defaultFS } from "@llamaindex/env";
+import { defaultFS, getEnv, type GenericFileSystem } from "@llamaindex/env";
 import { Document } from "../Node.js";
 import type { FileReader } from "./type.js";
 
@@ -24,7 +23,7 @@ export class LlamaParseReader implements FileReader {
 
   constructor(params: Partial<LlamaParseReader> = {}) {
     Object.assign(this, params);
-    params.apiKey = params.apiKey ?? process.env.LLAMA_CLOUD_API_KEY;
+    params.apiKey = params.apiKey ?? getEnv("LLAMA_CLOUD_API_KEY");
     if (!params.apiKey) {
       throw new Error(
         "API Key is required for LlamaParseReader. Please pass the apiKey parameter or set the LLAMA_CLOUD_API_KEY environment variable.",
diff --git a/packages/core/src/storage/vectorStore/AstraDBVectorStore.ts b/packages/core/src/storage/vectorStore/AstraDBVectorStore.ts
index 17c0170c38d5cab57897ea7fce5ef8732546c659..77c1b5bb0381f5755c8413b489edcd687fd5f97a 100644
--- a/packages/core/src/storage/vectorStore/AstraDBVectorStore.ts
+++ b/packages/core/src/storage/vectorStore/AstraDBVectorStore.ts
@@ -1,5 +1,6 @@
 import { AstraDB } from "@datastax/astra-db-ts";
 import type { Collection } from "@datastax/astra-db-ts/dist/collections";
+import { getEnv } from "@llamaindex/env";
 import type { BaseNode } from "../../Node.js";
 import { MetadataMode } from "../../Node.js";
 import type {
@@ -34,9 +35,8 @@ export class AstraDBVectorStore implements VectorStore {
     if (init?.astraDBClient) {
       this.astraDBClient = init.astraDBClient;
     } else {
-      const token =
-        init?.params?.token ?? process.env.ASTRA_DB_APPLICATION_TOKEN;
-      const endpoint = init?.params?.endpoint ?? process.env.ASTRA_DB_ENDPOINT;
+      const token = init?.params?.token ?? getEnv("ASTRA_DB_APPLICATION_TOKEN");
+      const endpoint = init?.params?.endpoint ?? getEnv("ASTRA_DB_ENDPOINT");
 
       if (!token) {
         throw new Error(
@@ -48,7 +48,7 @@ export class AstraDBVectorStore implements VectorStore {
       }
       const namespace =
         init?.params?.namespace ??
-        process.env.ASTRA_DB_NAMESPACE ??
+        getEnv("ASTRA_DB_NAMESPACE") ??
         "default_keyspace";
       this.astraDBClient = new AstraDB(token, endpoint, namespace);
     }
diff --git a/packages/core/src/storage/vectorStore/MongoDBAtlasVectorStore.ts b/packages/core/src/storage/vectorStore/MongoDBAtlasVectorStore.ts
index 491d5fd10b1604923dd7dbe2aea2373404a7d33b..b37fe67695cc17d2e49374dacd83881929fb42f4 100644
--- a/packages/core/src/storage/vectorStore/MongoDBAtlasVectorStore.ts
+++ b/packages/core/src/storage/vectorStore/MongoDBAtlasVectorStore.ts
@@ -1,3 +1,4 @@
+import { getEnv } from "@llamaindex/env";
 import type { BulkWriteOptions, Collection } from "mongodb";
 import { MongoClient } from "mongodb";
 import type { BaseNode } from "../../Node.js";
@@ -44,7 +45,7 @@ export class MongoDBAtlasVectorSearch implements VectorStore {
     if (init.mongodbClient) {
       this.mongodbClient = init.mongodbClient;
     } else {
-      const mongoUri = process.env.MONGODB_URI;
+      const mongoUri = getEnv("MONGODB_URI");
       if (!mongoUri) {
         throw new Error(
           "Must specify MONGODB_URI via env variable if not directly passing in client.",
diff --git a/packages/core/src/storage/vectorStore/PineconeVectorStore.ts b/packages/core/src/storage/vectorStore/PineconeVectorStore.ts
index ae4f6923b7cd20e0477a139b8426fe4b6d8698c6..74c32552910581ad2d4fab67ce6c552ac84ee355 100644
--- a/packages/core/src/storage/vectorStore/PineconeVectorStore.ts
+++ b/packages/core/src/storage/vectorStore/PineconeVectorStore.ts
@@ -6,7 +6,7 @@ import type {
   VectorStoreQueryResult,
 } from "./types.js";
 
-import type { GenericFileSystem } from "@llamaindex/env";
+import { getEnv, type GenericFileSystem } from "@llamaindex/env";
 import type {
   FetchResponse,
   Index,
@@ -45,11 +45,11 @@ export class PineconeVectorStore implements VectorStore {
 
   constructor(params?: PineconeParams) {
     this.indexName =
-      params?.indexName ?? process.env.PINECONE_INDEX_NAME ?? "llama";
-    this.namespace = params?.namespace ?? process.env.PINECONE_NAMESPACE ?? "";
+      params?.indexName ?? getEnv("PINECONE_INDEX_NAME") ?? "llama";
+    this.namespace = params?.namespace ?? getEnv("PINECONE_NAMESPACE") ?? "";
     this.chunkSize =
       params?.chunkSize ??
-      Number.parseInt(process.env.PINECONE_CHUNK_SIZE ?? "100");
+      Number.parseInt(getEnv("PINECONE_CHUNK_SIZE") ?? "100");
     this.textKey = params?.textKey ?? "text";
   }
 
diff --git a/packages/core/tests/tsconfig.json b/packages/core/tests/tsconfig.json
index 6576baf06d4a003462ff40e8fa45a75900ef3f6a..c1b0f9adf63f50c7f9a03fc3cf2072599dd8d856 100644
--- a/packages/core/tests/tsconfig.json
+++ b/packages/core/tests/tsconfig.json
@@ -6,5 +6,13 @@
     "moduleResolution": "node16",
     "target": "ESNext"
   },
-  "include": ["./**/*.ts"]
+  "include": ["./**/*.ts"],
+  "references": [
+    {
+      "path": "../../core/tsconfig.json"
+    },
+    {
+      "path": "../../env/tsconfig.json"
+    }
+  ]
 }
diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json
index 6367996de5315571c3264ede6a205299ea897ede..3867a74e039f0ec56b563655d722cae18587b210 100644
--- a/packages/core/tsconfig.json
+++ b/packages/core/tsconfig.json
@@ -3,6 +3,7 @@
   "compilerOptions": {
     "rootDir": "./src",
     "outDir": "./dist/type",
+    "tsBuildInfoFile": ".tsbuildinfo",
     "emitDeclarationOnly": true,
     "module": "node16",
     "moduleResolution": "node16",
@@ -10,5 +11,10 @@
     "strict": true
   },
   "include": ["./src"],
-  "exclude": ["node_modules"]
+  "exclude": ["node_modules"],
+  "references": [
+    {
+      "path": "../env/tsconfig.json"
+    }
+  ]
 }
diff --git a/packages/env/jsr.json b/packages/env/jsr.json
new file mode 100644
index 0000000000000000000000000000000000000000..6dec8c04c0caec00a175f5327544e8b75d0063ea
--- /dev/null
+++ b/packages/env/jsr.json
@@ -0,0 +1,8 @@
+{
+  "name": "@llamaindex/env",
+  "version": "0.0.4",
+  "exports": {
+    ".": "./src/index.ts",
+    "./type": "./src/type.ts"
+  }
+}
diff --git a/packages/env/src/index.polyfill.ts b/packages/env/src/index.polyfill.ts
index 6c3c4131bdca878695610b3a6e4b242f8dd849a8..7a844d7a286ec831371bc697bb7f9a1b98d2a655 100644
--- a/packages/env/src/index.polyfill.ts
+++ b/packages/env/src/index.polyfill.ts
@@ -39,3 +39,4 @@ export function randomUUID(): string {
   return crypto.randomUUID();
 }
 export * from "./type.js";
+export { getEnv } from "./utils.js";
diff --git a/packages/env/src/index.ts b/packages/env/src/index.ts
index bd5095def80ee4fc2d5136f6a0453785c932da2a..e2692d3cc9bc6e478b6340c2021e5b89ba37216f 100644
--- a/packages/env/src/index.ts
+++ b/packages/env/src/index.ts
@@ -34,5 +34,6 @@ export const defaultFS: CompleteFileSystem = {
   stat: fs.stat,
 };
 
-export * from "./type.js";
+export type * from "./type.js";
+export { getEnv } from "./utils.js";
 export { EOL, ok, path, randomUUID };
diff --git a/packages/env/src/type.ts b/packages/env/src/type.ts
index 00fb0a613dbde09f39a3d38cdbfc4d18bb95ca2c..303676dada46c4b0ad702ce5a12d5fa7aec75dbc 100644
--- a/packages/env/src/type.ts
+++ b/packages/env/src/type.ts
@@ -58,9 +58,8 @@ export class InMemoryFileSystem implements CompleteFileSystem {
     }
   }
 
-  async mkdir(path: string) {
+  async mkdir(path: string): Promise<undefined> {
     this.files[path] = _.get(this.files, path, null);
-    return undefined;
   }
 
   async readdir(path: string): Promise<string[]> {
diff --git a/packages/env/src/utils.ts b/packages/env/src/utils.ts
new file mode 100644
index 0000000000000000000000000000000000000000..48b1efccf61a6ca2ed257d0c2cb6f8d224a91d72
--- /dev/null
+++ b/packages/env/src/utils.ts
@@ -0,0 +1,12 @@
+export function getEnv(name: string): string | undefined {
+  if (typeof process === "undefined" || typeof process.env === "undefined") {
+    // @ts-expect-error
+    if (typeof Deno === "undefined") {
+      throw new Error("Current environment is not supported");
+    } else {
+      // @ts-expect-error
+      return Deno.env.get(name);
+    }
+  }
+  return process.env[name];
+}
diff --git a/packages/env/tsconfig.json b/packages/env/tsconfig.json
index 373c7407927a283432281706523305aece49ca0b..c81013f82dca3bc57e0dd926e28e1b4754e8b4b1 100644
--- a/packages/env/tsconfig.json
+++ b/packages/env/tsconfig.json
@@ -3,6 +3,7 @@
   "compilerOptions": {
     "rootDir": "./src",
     "outDir": "./dist/type",
+    "tsBuildInfoFile": ".tsbuildinfo",
     "emitDeclarationOnly": true,
     "module": "node16",
     "moduleResolution": "node16",
diff --git a/tsconfig.json b/tsconfig.json
index 561b01dd2dd236bbb0e53cbc503ccf99fa6a213f..ee2dbb5316882feba84b503410236a1e40a4364e 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -11,7 +11,13 @@
     "outDir": "./lib",
     "tsBuildInfoFile": "./lib/.tsbuildinfo",
     "incremental": true,
-    "composite": true
+    "composite": true,
+    "paths": {
+      "llamaindex": ["./packages/core/src/index.ts"],
+      "llamaindex/*": ["./packages/core/src/*.ts"],
+      "@llamaindex/env": ["./packages/env/src/index.ts"],
+      "@llamaindex/env/*": ["./packages/env/src/*.ts"]
+    }
   },
   "files": [],
   "references": [