Skip to content

The type file of module 'ketcher-standalone' cannot be resolved. #5760

Open
@seungyeon-molcube

Description

@seungyeon-molcube

Steps to Reproduce
import { StandaloneStructServiceProvider } from 'ketcher-standalone';

Actual behavior
Importing ketcher-standalone results in the following TypeScript error message:

Could not find a declaration file for module 'ketcher-standalone'. '/path/to/dir/node_modules/ketcher-standalone/dist/index.modern.js' implicitly has an 'any' type.
  There are types at '/path/to/dir/node_modules/ketcher-standalone/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'ketcher-standalone' library may need to update its package.json or typings.

Expected behavior
No TypeScript error.

Desktop (please complete the following information):

  • OS: [MacOS 14.6.1]
  • Browser [N.A]
  • Version [e.g. 22]

Ketcher version [v2.25.0].

Additional context

  • The error message is caused by TypeScript in VS Code.
  • This was resolved when "types" were added to "exports" in /node_modules/ketcher-standalone/package.json.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions