Thanks to visit codestin.com
Credit goes to github.com

Skip to content

v2.23 causes no-extraneous-dependencies errors for related @types/ packages that aren't imported #2078

@neefrehman

Description

@neefrehman

Since upgrading to v2.23 I'm seeing lot's of errors in my TypeScript codebase related to @types dependencies, even though they are not directly being imported. for example:

import React from "react";
import * as THREE from "three";
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls";

Is throwing:

  3:1  error  '@types/react' should be listed in the project's dependencies, not devDependencies  import/no-extraneous-dependencies
  4:1  error  '@types/three' should be listed in the project's dependencies, not devDependencies  import/no-extraneous-dependencies
  5:1  error  '@types/three' should be listed in the project's dependencies, not devDependencies  import/no-extraneous-dependencies

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