[Vuejs]-Parsing error: Unexpected keyword 'export' in Nuxt.js

0๐Ÿ‘

โœ…

You have to remove the , before export and assign the data to your localStorage item as follows :

 localStorage['tokenExpiration']= new Date().getTime() + result.expiresIn * 1000

0๐Ÿ‘

I removed , before export and it works! Thank you, Boussadjra Brahim ๐Ÿ˜€

This is what my code looks like now:

 // some.js

 const title = [
{...},
{...},
{...},
]
        
export { title };

Leave a comment