Skip to content

Could not find a declaration file for module '@snowplow/webview-tracker'. #18

Open
@levondatflutterint

Description

@levondatflutterint

import { trackSelfDescribingEvent } from '@snowplow/webview-tracker'; results in:

Could not find a declaration file for module '@snowplow/webview-tracker'. '[local path]/node_modules/@snowplow/webview-tracker/dist/index.umd.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/snowplow__webview-tracker` if it exists or add a new declaration (.d.ts) file containing `declare module '@snowplow/webview-tracker';`ts(7016)

Adding types to exports resolves the issue.

"exports": {
    "import": "./dist/index.modern.mjs",
    "require": "./dist/index.umd.js",
    "types": "./dist/index.d.ts"
},

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