Ravenous Part 4 - APIKey as string regarded as undefined

I’m getting this:

Failed to compile.

./src/util/Yelp.js
  Line 7:38:   'blahblahblahapikey' is not defined  no-undef
  Line 7:122:  'restofmyapikeyblahblahblah' is not defined                                         no-undef

At the top of Yelp.js I have:

const apiKey = 'apikey';

What’s the issue here?

It seems like the ‘-’ character is causing some sort of problem but I don’t know why or how to fix it.

Ah, wait. Line 7 is where the issue was, not line 1. For whatever reason instead of using the variable I defined I copied the API key directly and it gave me an issue.

1 Like

The rubber ducky effect! Talking about a problem out loud (writing about in this case) helped you find the solution :+1:

2 Likes