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

Typescript example #184

Open
vmiheer opened this issue Sep 15, 2020 · 3 comments
Open

Typescript example #184

vmiheer opened this issue Sep 15, 2020 · 3 comments

Comments

@vmiheer
Copy link

vmiheer commented Sep 15, 2020

Hi, am following readme instructions and I am getting error:

Uncaught TypeError: spotify_web_api_js_1.default is not a constructor
import SpotifyWebApi from 'spotify-web-api-js';
let spotify = new SpotifyWebApi();

Am I missing something obvious?

@JMPerez
Copy link
Owner

JMPerez commented Dec 11, 2020

Hi @vmiheer. Could you share an example of your project, maybe using codesandbox?

I just tried the code on https://codesandbox.io/s/amazing-cherry-31eom?file=/src/index.js and it seems to be working.

@davidseek
Copy link

I'm having the same problem in a Firebase Functions project.
Literally same logic as in the shared codesandbox, and yet I as well get:

Uncaught TypeError: spotify_web_api_js_1.default is not a constructor

@davidseek
Copy link

NVM

I'm sure the other dude was using this lib for Node as well.
Might be a good idea to put a disclaimer up and linking to the Node version?

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

No branches or pull requests

3 participants