Skip to content

node type #180

@lcs-bgonzalez

Description

@lcs-bgonzalez

Describe the bug

Error message Cannot find name 'require'. Do you need to install type definitions for node? Try 'npm i --save-dev @types/node'.

To Reproduce

Code snippets

May be solved by having the "node" type in the types attribute of tsconfig.json.

{
  "compilerOptions": {
    "declaration": true,
    "target": "es6",
    "module": "commonjs",
    "noImplicitAny": true,
    "outDir": "dist",
    "rootDir": ".",
    "types": [ "node" ],
    "typeRoots": [
      "node_modules/@types"
    ]
  },
  "exclude": [
    "dist",
    "node_modules"
  ]
}

OS

Windows 10

Node version

Node v18.12.1

Library version

openai 3.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixed in v4Issues addressed by v4

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions