Skip to content

Cannot find module 'rnx-gradient' or its corresponding type declarations. #16

@erksch

Description

@erksch

Hey there!

Thank you for porting this library to Fabric!

I have trouble importing from the library in TypeScript:

import { LinearGradient } from 'rnx-gradient';

results in

Cannot find module 'rnx-gradient' or its corresponding type declarations.

I guess this has something to do with the library's source being published as is (Flow typed code) to NPM without any transpilation.

My workaround is adding it to my index.d.ts:

declare module 'rnx-gradient';

and disabling EsLint errors

// eslint-disable-next-line import/no-unresolved
import { LinearGradient } from 'rnx-gradient';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions