TypeError Identifier 'assert' has already been declared
Posted odejsjhshw
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了TypeError Identifier 'assert' has already been declared相关的知识,希望对你有一定的参考价值。
1、错误描述
> const assert=require(‘assert‘);
TypeError: Identifier ‘assert‘ has already been declared
at repl:1:1
at REPLServer.defaultEval (repl.js:262:27)
at bound (domain.js:287:14)
at REPLServer.runBound [as eval] (domain.js:300:12)
at REPLServer.<anonymous> (repl.js:431:12)
at emitOne (events.js:82:20)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:211:10)
at REPLServer.Interface._line (readline.js:550:8)
at REPLServer.Interface._ttyWrite (readline.js:827:14)
>
2、错误原因
由错误提示可知assert标识符已经声明了
3、解决办法
不能用关键字、标识符命名
再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow
以上是关于TypeError Identifier 'assert' has already been declared的主要内容,如果未能解决你的问题,请参考以下文章
Django TypeError: isinstance() arg 2 must be a type or tuple of types
如果 segue.identifier == "showChildFiles" 当 segue 标识符看起来正确时,Swift 3 准备 segue 不通过
使用 google Analytics SDK 3.09 需要在 iTunes Connect 中检查 Advertising Identifier(IDFA) 吗?