Problem in jamming project

this is the link to my website:
http://long-term-plane.surge.sh/

So as soon as i click on the click on the search button i am redirected to a page which shows the following message:
response_type must be code or token

p.s just some time before it was working fine
this is spotify.js file:

let clientID = '****************************';
let redirectID = "http://long-term-plane.surge.sh/";
let accessToken;
const spotify = {
    getAccessToken (){
        if(accessToken){
            return accessToken;
        }
        const accessTokenMatch = window.location.href.match(/access_token=([^&]*)/)
        const expiresInMatch = window.location.href.match(/expires_in=([^&]*)/)

        if(accessTokenMatch && expiresInMatch){
            accessToken = accessTokenMatch[1];
            const expiresIn = Number(expiresInMatch[1]);


            window.setTimeout(() => accessToken = '', expiresIn * 1000);
window.history.pushState('Access Token', null, '/');
     return accessToken;
        }else{
           const redirectURI =`https://accounts.spotify.com/authorize?client_id=${clientID}&response_typ
           e=token&scope=playlist-modify-public&redirect_uri=${redirectID} `
           window.location = redirectURI;
        }
    
    },

    search(term){

        const accessToken = spotify.getAccessToken();
      return fetch(`https://api.spotify.com/v1/search?type=track&q=${term}`,
     {
        headers: {Authorization: `Bearer ${accessToken}`}
      }).then((response)=>{
          return response.json()
      }).then((jsonResponse)=>{
          if(!jsonResponse.tracks ){
              return [];
          }
          return jsonResponse.tracks.items.map((track)=>({
                                 id: track.id,
                                 name:track.name,
                                 artist: track.artists[0].name,
                                 album:track.album.name,
                                 uri:track.uri


          }))
      })
    
    },
    savePlaylist(name,trackUris){
        if(!name|| !trackUris.length){
            return;
        }
        const accessToken = spotify.getAccesToken();
        const headers = { Authorization: `Bearers ${accessToken}`}
        let userID ;

        return fetch('https://api.spotify.com/v1/me',
        {Headers:headers}
        ).then((response)=>{
            return response.json();
        }).then((jsonResponse)=>{
            userID = jsonResponse.id;
            return fetch(` https://api.spotify.com/v1/users/${userID}/playlists`,
            {
                headers:headers,
                method:'POST',
                body:JSON.stringify({name:name})
            }).then((response)=>{
                return response.json();
            }).then((jsonResponse)=>{
                let playlistID = jsonResponse.id;
             return fetch (` https://api.spotify.com/v1/users/${userID}/playlists/${playlistID}/tracks
             `,
             {
                 headers:headers,
                 method:'POST',
                 body: JSON.stringify({uris:trackUris})
             })          
              })
        })
    }

    
};

export default spotify;