question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'YouTube' is not defined

See original GitHub issue

I’m trying to use the YouTube Data API and getting this error when trying to deploy :

error 'YouTube' is not defined no-undef

I have included the following on my manifest file, but to no avail :

{ "userSymbol": "YouTube", "serviceId": "youtube", "version": "v3" }

And the line that throws the error is the following:

const results = YouTube.Search.list('id,snippet', options);

Not sure what else I should be doing, can someone help?

Here’s my manifest file :

{ "timeZone": "Europe/London", "dependencies": { "enabledAdvancedServices": [{ "userSymbol": "Gmail", "serviceId": "gmail", "version": "v1" }, { "userSymbol": "Drive", "serviceId": "drive", "version": "v2" }, { "userSymbol": "YouTube", "serviceId": "youtube", "version": "v3" } ], "libraries": [{ "userSymbol": "OAuth1", "libraryId": "1CXDCY5sqT9ph64fFwSzVtXnbjpSfWdRymafDrtIZ7Z_hwysTY7IIhi7s", "version": "16" }, { "userSymbol": "OAuth2", "libraryId": "1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDF", "version": "33" } ] }, "webapp": { "access": "ANYONE", "executeAs": "USER_ACCESSING" }, "exceptionLogging": "STACKDRIVER", "oauthScopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/youtube", "https://www.googleapis.com/auth/script.external_request", "https://www.googleapis.com/auth/script.scriptapp", "https://www.googleapis.com/auth/script.storage", "https://www.googleapis.com/auth/script.webapp.deploy", "https://www.googleapis.com/auth/spreadsheets", "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/script.container.ui" ] }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
unncommoncommented, Jul 12, 2019

Thank you, its working now.

0reactions
contributorpwcommented, Aug 1, 2019

No longer required since the service is now part of the Eslint GAS plugin. The commit d65eba575d47abfec5190dc3de40c914e25062b9 closes this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

YT is not defined - Uncaught ReferenceError: [youtube api]
Call this loadPlayer(); inside document.ready function and try. function loadScript() { if (typeof(YT) == 'undefined' || typeof(YT.
Read more >
Insight YouTube Uncaught ReferenceError: YT is not defined
On a page with a youtube embed, it does not track interactions and only one interaction is fired ("Play youtube video").
Read more >
'YT' is not defined · Issue #336 · youtube/api-samples - GitHub
I am following Youtube Iframe API reference for my React project. When I run it locally, it is returning this error: 'YT' is...
Read more >
YT is not defined - Uncaught ReferenceError: [youtube api]
Hello, When logged in as admin on my site I kept getting a friendly nag error for admins about. YT is not defined...
Read more >
Not Defined - YouTube
While recently going through the hardest few years of my life: being laid-off; being diagnosed with MS; dealing with major mental health challenges;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found