5 Comments

  1. In my project, I am using an aspx page in my Site Pages library and pulling the .js files all from the Styles Gallery document library. For some reason I cannot ever use
    $pnp.sp.web.lists … and always have to define
    var w = new $pnp.Web(baseurl);
    so as to do
    w.lists … instead.
    It seems like I can not run the scripts from the current context.
    And so I have that problem with profiles, except I don’t know what to do to define profiles as a new var…
    $pnp.sp.profiles.

    Any clue for me?

  2. Hi,
    This error occurs when getting the properties of the current user:

    SyntaxError: “JSON.parse: unexpected character at line 1 column 1 of the JSON data”
    parseImpl https://mySite/SiteAssets/js/pnp.js:3933:84

    My code:

    $pnp.sp.profiles.myProperties.get()
    .then(function(result) {
    console.log(result);
    })
    .catch(function(err) {
    console.log(err);
    });

    Why does this error occur?

Leave a Reply

Your email address will not be published. Required fields are marked *