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

Example does not work #1113

Open
LouiseEH opened this issue May 26, 2023 · 2 comments
Open

Example does not work #1113

LouiseEH opened this issue May 26, 2023 · 2 comments
Labels

Comments

@LouiseEH
Copy link

Describe the bug
I am using the simple example with the client secret, but I get the following error:
Error [ERR_REQUIRE_ESM]: require() of ES Module <my_path>/src/lib/dropbox/dropbox-api.js not supported.
Instead change the require of index.js in <my_path>/src/lib/dropbox/dropbox-api.js to a dynamic import() which is available in all CommonJS modules.

To Reproduce
Use the simple example with the client secret

Expected Behavior
The example should produce an oauth token

Actual Behavior
An error occurs as described above on npm run dev

Screenshots
N/A

Versions

  • What version of the SDK are you using? -> 10.34.0
  • What version of the language are you using? -> which language?
  • Are you using Javascript or Typescript? -> Javascript
  • What platform are you using? (if applicable) -> express, node

Additional context
N/A

@LouiseEH LouiseEH added the bug label May 26, 2023
@LouiseEH
Copy link
Author

Using:

const fetch = require('isomorphic-fetch')

seems to work

@greg-db
Copy link
Contributor

greg-db commented May 30, 2023

Can you elaborate on exactly what you're running and how? For instance, are you referring to this examples/javascript/simple-backend sample in particular? Please share the full steps and commands you're following to reproduce the issue you're seeing.

Also, what version of Node are you using?

Thanks!

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