Skip to content
This repository was archived by the owner on Sep 4, 2026. It is now read-only.
This repository was archived by the owner on Sep 4, 2026. It is now read-only.

NPM package doesnt work #29

Description

@mebibou

Since the node package repo is not public (for what reason?), I am logging this here.

When doing a catalog search:

const api = mendeley({
  authFlow: mendeley.Auth.clientCredentialsFlow({
    clientId: 'clientId',
    clientSecret: 'clientSecret',
    redirectUri:'redirectUri'
  })
});
await api.search.catalog({ title: 'Nitrogen loss from fertilizers applied to maize, wheat and rice in the North China Plain' })

This will fail:

TypeError: Cannot read property 'trim' of undefined
    at extractLinkHeaders ([...]/node_modules/@mendeley/api/lib/request.js:184:25)
    at Request.onDone ([...]/node_modules/@mendeley/api/lib/request.js:125:37)

Even though when I check the reponse data, it contains 10 results with the first result the one I'm looking for. But it's trying to extract this link headers and fails

Some other titles do not cause this issue, but many do, and it's quite the bugger (also please have the node sdk as public so people can log issues?)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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