Skip to content

Can't import #1

@johnflux

Description

@johnflux

The npm package says to import as "@gradientai/nodejs-sdk" ( https://socket.dev/npm/package/@gradientai/nodejs-sdk ) which makes typescript happy, and I can autocomplete, but then when I do "npm start" gives the error:

"The requested module does not provide an export named "Gradient".

The example app on the other hand does:

import { Gradient } from "@gradientai/nodejs-sdk/src/gradient";

but this gives the error "Cannot find module or its corresponding type declarations"

If you look in the package.json in nodejs-sdk you can see the listed exports, and src/gradient is not listed in the exports.

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