Skip to content

Could not find a declaration file for module #1904

Closed

Description

@blessanm86

Search Terms

Could not find a declaration file for module 'json-to-pretty-yaml'

I am trying to upgrade from v9.1.1 to v10.9.1
I keep getting the above error but my I have a .d.ts file in the directory for this module. It worked totally fine with the older version.

I tried many things like adding types, typeRoots and paths in the tsconfig. Nothing seems to have any affect.
The code works fine if I run tsc.

This is my tsconfig

{
  "extends": "../../../tsconfig.base.json",
  "compilerOptions": {
    "module": "commonjs",
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "noImplicitOverride": true,
    "noPropertyAccessFromIndexSignature": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true
  },
  "files": [],
  "include": [],
  "references": [
    {
      "path": "./tsconfig.lib.json"
    }
  ]
}

Specifications

ts-node v10.9.1
node v16.10.0
compiler v4.8.4
  • Operating system and version: Mac Monterey

Activity

  1. locked and limited conversation to collaborators on Oct 29, 2022
  2. converted this issue into a discussion #1906 on Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions