Skip to content

TypeError: sp.setup is not a function #12

@dma82

Description

@dma82

Hi,

I installed pnp-auth v2.0.0 and @pnp/sp-commonjs v2.11.0 and I'm using them in my project in this way:

const bootstrap = require("pnp-auth").bootstrap;
const taxonomy = import("@pnp/sp-commonjs/taxonomy/index.js");

let url = settings.sharepoint365.url;

bootstrap(taxonomy, {
    username: settings.sharepoint.auth.username, 
    password: settings.sharepoint.auth.password }, 
    url);

But I send my request, I get this error:

C:\my-project\node_modules\pnp-auth\lib\index.js:17
    sp.setup({
       ^

TypeError: sp.setup is not a function
    at bootstrap (C:\my-project\node_modules\pnp-auth\lib\index.js:17:8)
...
..., etc.

Am I doing anything wrong or is this a bug?

Thank you.

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