我收到了确认新流星更新的电子邮件,因此我执行了以下命令
流星更新
现在,每当我尝试运行我的应用程序时,都会发生以下错误:
TypeError: Cannot call method 'displayName' of undefined
at SourceProcessorSet.addLegacyHandler (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\isobuild\build-plugin.js:151:84)
at C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\isobuild\build-plugin.js:187:14
at Function._.each._.forEach (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\underscore\underscore.js:87:22)
at SourceProcessorSet.merge (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\isobuild\build-plugin.js:181:7)
at C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\isobuild\compiler.js:377:26
at Array.forEach (native)
at C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\isobuild\compiler.js:373:26
at C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\buildmessage.js:367:18
at [object Object].withValue (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\fiber-helpers.js:107:14)
at C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\buildmessage.js:360:34
at [object Object].withValue (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\fiber-helpers.js:107:14)
at C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\buildmessage.js:358:23
at [object Object].withValue (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\fiber-helpers.js:107:14)
at Object.enterJob (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\buildmessage.js:332:26)
at C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\isobuild\compiler.js:370:16
at C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\isobuild\compiler.js:175:26
at Array.forEach (native)
at Function._.each._.forEach (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\underscore\underscore.js:79:11)
at Object.compile (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\isobuild\compiler.js:170:5)
at C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\isobuild\bundler.js:2601:24
at C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\buildmessage.js:279:13
at [object Object].withValue (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\fiber-helpers.js:107:14)
at C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\buildmessage.js:272:29
at [object Object].withValue (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\fiber-helpers.js:107:14)
at C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\buildmessage.js:270:18
at [object Object].withValue (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\fiber-helpers.js:107:14)
at C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\buildmessage.js:261:23
at [object Object].withValue (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\fiber-helpers.js:107:14)
at Object.capture (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\utils\buildmessage.js:260:19)
at Object.exports.bundle (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\isobuild\bundler.js:2546:31)
at C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\runners\run-app.js:651:36
at Function.run (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\tool-env\profile.js:485:12)
at bundleApp (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\runners\run-app.js:641:34)
at AppRunner._runOnce (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\runners\run-app.js:694:35)
at AppRunner._fiber (C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\runners\run-app.js:957:28)
at C:\Users\howna13\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\tools\runners\run-app.js:472:12
我试过了
meteor npm install --save classnames
然而,错误不断出现。知道问题可能是什么以及如何解决?
答案 0 :(得分:0)
您需要为我们提供更多代码来帮助您。乍一看,您似乎已将React组件转换为类并保留了displayName属性。
您应该从React ES6组件定义中删除displayName。
我不认为类名会让你遇到麻烦。
npm i --save classnames
当你想要使用它时:
import classNames from 'classnames';
请记住将导入保留在文件的目标位置。