0

This is the relevant portion of my code (imports, etc. not included)

import Spotify from 'react-native-spotify';

let spotifyOptions = {
    "clientID": "69708bf2b35e4cc2b208fafa600ce9a9",
    "sessionUserDefaultsKey": "SpotifySession",
    "redirectURL": "MoodMixer://auth",
    "scopes": ["user-read-private", "playlist-read", "playlist-read-private", "streaming"],
};

export default class App extends React.Component {

    render() {

            Spotify.initialize(spotifyOptions, (loggedIn, error) => {
                if (error != null) {
                    Alert.alert("ERROR", error.message);
                }
            });

I keep getting this error when I run it

Error in Expo IMAGE

1 Answers1

0

Assuming you're using this version, you're importing it wrong according to their readme. Remove your curly braces, making it a default import. You're currently trying import a named export that doesn't exist.

import spotify from 'react-native-spotify';
Andy Ray
  • 30,372
  • 14
  • 101
  • 138