Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: The requested module 'node-zendesk' does not provide an export named 'createClient' #425

Open
ollebergkvist opened this issue Sep 9, 2024 · 1 comment
Labels

Comments

@ollebergkvist
Copy link

ollebergkvist commented Sep 9, 2024

Describe the Bug
Using import { createClient } from 'node-zendesk' in a ts project causes ts error.

Example Code

import { createClient } from 'node-zendesk'

const client = createClient({
  username: ZENDESK_EMAIL,
  token: ZENDESK_TOKEN,
  subdomain: ZENDESK_SUBDOMAIN
})

Expected Behavior
Should work in ESM ts project.

Actual Behavior
SyntaxError: The requested module 'node-zendesk' does not provide an export named 'createClient'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:146:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:229:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
at async loadPlugin (./node_modules/.pnpm/@fastify+autoload@5.10.0/node_modules/@fastify/autoload/index.js:257:15)
at async Promise.all (index 16)
at async autoload (./node_modules/.pnpm/@fastify+autoload@5.10.0/node_modules/@fastify/autoload/index.js:29:3)

Environment Information

  • node-zendesk version: 5.0.13
  • Node.js version: 20.17.0
  • Operating System: OSX
  • Any other relevant software versions?
    "typescript": "^5.5.4",

Additional Context
Add any other context about the problem here.

@blakmatrix
Copy link
Owner

Hi @ollebergkvist

Thanks for reporting this issue! It looks like you're currently on node-zendesk@5.0.13, but a newer version is available. Could you try updating to the latest version and see if the issue persists?

You can update using:

npm install node-zendesk@latest

If you're still encountering the problem after updating, please let me know, and we can dig in further. Otherwise, I'll plan to close this issue in a few days to keep things organized.

Thanks for your help and patience!

Best,
Farrin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants