简体   繁体   English

Firebase 3.6.2 Web SDK缺少“严格使用”

[英]Firebase 3.6.2 Web SDK missing “use strict”

I was trying to get a web app up and running and followed a very straightforward tutorial from Firebase. 我试图启动并运行Web应用程序,并遵循Firebase的一个非常简单的教程。 The link is pasted as a comment below. 该链接被粘贴为下面的注释。

The webpage, upon being loaded in Google Chrome, does not behave according to the tutorial. 该网页在Google Chrome浏览器中加载后,按照该教程的操作无法正常运行。 You are supposed to be able to change the value at a location specified at the child node "text" of my Firebase database and the webpage ought to update the text of a to reflect the change of the database. 您应该能够在Firebase数据库的子节点“文本”中指定的位置更改值,并且网页应该更新a的文本以反映数据库的更改。 It doesn't. 没有。 Dreamweaver tells me I'm forgetting the "use strict"; Dreamweaver告诉我,我忘记了“严格使用”; line in Firebase.js Firebase.js中的一行

I was wondering if anybody had any idea why this was? 我想知道是否有人知道为什么会这样吗? I imagine I'm making an obvious mistake somewhere. 我想我在某个地方犯了一个明显的错误。

I've also included screenshots of the error and my source code. 我还提供了错误和我的源代码的屏幕截图。 I appreciate any help! 感谢您的帮助!

Thanks! 谢谢!

error from Firebase.js Firebase.js中的错误 Firebase.js中的错误

my source code 我的源代码 我的源代码

Dreamweaver runs a linter on all code and the 'use strict' warning is a red herring for your problem. Dreamweaver在所有代码上运行linter,并且“使用严格”警告对您的问题是一个红色鲱鱼。 Code without 'use strict' isn't going to break anything so ignore it. 没有“严格使用”的代码不会破坏任何内容,因此请忽略它。 If you find the warning distracting, you can disable it in Dreamweaver. 如果发现警告分​​散了您的注意力,则可以在Dreamweaver中将其禁用。

Anyway, if something isn't working in your app, you should be checking for errors in your browser's console log. 无论如何,如果您的应用无法正常运行,则应检查浏览器的控制台日志中是否存在错误。

If your screenshot contains the entirety of your code, your problem might be that you're trying to set the innerText of a non-existent element, bigOne . 如果您的屏幕快照包含整个代码,则您的问题可能是您试图设置不存在的元素bigOneinnerText This would present in the console as an error like "cannot set property innerText of undefined". 这将在控制台中显示为错误,例如“无法设置未定义的属性innerText属性”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 缺少“使用严格”声明 - Missing “Use strict” statement Firebase SDK 缺少数据库() function - Firebase SDK is missing database() function 禁用“使用use strict的函数形式”但保留“Missing'use strict'statement”警告 - Disable “use the function form of use strict” but keep the “Missing 'use strict' statement” warning 如何在 Sublime 3 中禁用 jshint 缺少的“使用严格”语句? - How to disable the Missing "use strict" statement by jshint in Sublime 3? 即使已在文件顶部声明,也缺少“ use strict” - Missing “use strict” even though it's already declared at top of file 我该如何解决“缺少'使用严格'声明”的问题? - How can I fix “Missing 'use strict' statement”? 如何在分配给变量的IIFE末尾防止“严格使用”? - How to prevent “missing use strict” at end of IIFE assigned to variable? “myFunction”已定义但从未使用过&缺少“use strict”语句冲突 - “myFunction” is defined but never used & Missing “use strict” statement clash 如何正确使用 Firebase Admin SDK 使用 Node.js 的网络应用程序? - How to properly use Firebase Admin SDK using Node.js for a web-app? Firebase Web SDK 3.x ServerValue时间戳? - Firebase Web SDK 3.x ServerValue timestamp?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM