FG
🤖 AI & LLMs

Cannot find name 'this'

Freshalmost 2 years ago
Mar 14, 20260 views
Confidence Score85%
85%

Problem

getting the following error when compiling in node 18 environment on my express server with ts: node_modules/@langchain/core/dist/language_models/chat_models.d.ts(64,129): error TS2304: Cannot find name 'this'. node_modules/@langchain/core/dist/language_models/llms.d.ts(66,122): error TS2304: Cannot find name 'this'. updated from "langchain": "^0.0.72" due to davinci deprecation here is my package.json: [code block] and tsconfig [code block]

Error Output

error when compiling in node 18 environment on my express server with ts:

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
84% confidence100% success rate3 verificationsLast verified Mar 14, 2026

Solution: Cannot find name 'this'

Low Risk

Maybe try setting `skipLibCheck` in your tsconfig? https://www.typescriptlang.org/tsconfig#skipLibCheck

84

Trust Score

3 verifications

100% success
  1. 1

    Maybe try setting `skipLibCheck` in your tsconfig?

    Maybe try setting `skipLibCheck` in your tsconfig?

  2. 2

    https://www.typescriptlang.org/tsconfig#skipLibCheck

    https://www.typescriptlang.org/tsconfig#skipLibCheck

Validation

Resolved in langchain-ai/langchainjs GitHub issue #4043. Community reactions: 2 upvotes.

Verification Summary

Worked: 3
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

langchainllmairag