Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Uncaught TypeError: validateEventDispatches is not a function #1172

Closed
ericschaal opened this issue May 30, 2017 · 7 comments
Closed

Uncaught TypeError: validateEventDispatches is not a function #1172

ericschaal opened this issue May 30, 2017 · 7 comments

Comments

@ericschaal
Copy link

[Enter steps to reproduce:]

  1. Press CMD+ALT+m (OSX) or CTRL+ALT+m (Linux, Windows) to run Meteor app.

Atom: 1.17.2 x64
Electron: 1.3.15
OS: Mac OS X 10.12.4
Thrown From: nuclide package 0.229.0

Stack Trace

Uncaught TypeError: validateEventDispatches is not a function

At /Users/ericschaal/.atom/packages/nuclide/node_modules/react/lib/EventPluginUtils.js:101

TypeError: validateEventDispatches is not a function
    at Object.executeDispatchesInOrder (/packages/nuclide/node_modules/react/lib/EventPluginUtils.js:101:5)
    at executeDispatchesAndRelease (/packages/nuclide/node_modules/react/lib/EventPluginHub.js:44:22)
    at executeDispatchesAndReleaseTopLevel (/packages/nuclide/node_modules/react/lib/EventPluginHub.js:55:10)
    at Array.forEach (native)
    at forEachAccumulated (/packages/nuclide/node_modules/react/lib/forEachAccumulated.js:25:9)
    at Object.processEventQueue (/packages/nuclide/node_modules/react/lib/EventPluginHub.js:231:7)
    at runEventQueueInBatch (/packages/nuclide/node_modules/react/lib/ReactEventEmitterMixin.js:18:18)
    at /packages/nuclide/node_modules/react/lib/ReactEventEmitterMixin.js:29:5)
    at handleTopLevelImpl (/packages/nuclide/node_modules/react/lib/ReactEventListener.js:73:24)
    at ReactDefaultBatchingStrategyTransaction.perform (/packages/nuclide/node_modules/react/lib/Transaction.js:138:20)
    at Object.batchedUpdates (/packages/nuclide/node_modules/react/lib/ReactDefaultBatchingStrategy.js:63:19)
    at Object.batchedUpdates (/packages/nuclide/node_modules/react/lib/ReactUpdates.js:98:20)
    at dispatchEvent (/packages/nuclide/node_modules/react/lib/ReactEventListener.js:150:20)

Commands

     -8:03.5.0 nuclide-task-runner:toggle-toolbar-visibility (input.hidden-input)
     -7:52.8.0 nuclide-console:toggle (div.nuclide-file-tree.focusable-panel.tree-view)
     -3:17.6.0 deprecation-cop:view (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -3:12.1.0 nuclide-diagnostics-ui:toggle-table (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
  3x -3:08.8.0 nuclide-outline-view:toggle (atom-pane.pane)
     -2:54.9.0 nuclide-flow:restart-flow-server (atom-pane.pane)
  2x -2:48.9.0 editor:newline (input.hidden-input)
     -2:48.5.0 core:move-up (input.hidden-input)
     -2:42.5.0 nuclide-console:toggle (input.hidden-input)
     -2:18 nuclide-console:clear (input.hidden-input)
     -1:57.8.0 nuclide-task-runner:toggle-toolbar-visibility (input.hidden-input)
     -1:26.7.0 core:confirm (input.hidden-input)
     -0:50.1.0 meteor-helper:toggle (div.package-detail.panels-item)
     -0:28.7.0 nuclide-datatip:toggle (input.hidden-input)
  2x -0:28.4.0 meteor-helper:toggle (input.hidden-input)
     -0:26.1.0 nuclide-datatip:toggle (input.hidden-input)

Non-Core Packages

atom-beautify 0.29.26 
autocomplete-json 5.5.0 
haskell-grammar 0.4.0 
highlight-selected 0.13.1 
language-babel 2.65.0 
language-graphql 0.9.0 
language-ini 1.19.0 
language-lua 0.9.11 
language-ocaml 1.9.3 
language-rust 0.4.10 
language-swift 0.5.0 
language-thrift 1.0.2 
MagicPython 1.0.10 
merge-conflicts 1.4.5 
meteor-api 2.20.0 
meteor-helper 0.29.0 
nuclide 0.229.0 
nuclide-format-js 0.0.36 
react 0.16.2 
set-syntax 0.3.2 
sort-lines 0.14.0 
tool-bar 1.1.0 
@matthewwithanm
Copy link
Contributor

Hey @ericschaal! Looks like this is an issue with meteor-helper. I've opend PEM--/meteor-helper#62 to try to get it fixed. In the meantime, you can work around it by disabling that package.

@PEM--
Copy link

PEM-- commented May 30, 2017

@matthewwithanm, @ericschaal This means that you're shipping this Atom's package without compiling it. Hence, for guys that haven't set NODE_ENV to production, they have a slow down usage.

@PEM--
Copy link

PEM-- commented May 30, 2017

And as a side effect, packages, like meteor-helper that modifies NODE_ENV for execution purposes, breaks your package execution 🤔

@matthewwithanm
Copy link
Contributor

Hence, for guys that haven't set NODE_ENV to production, they have a slow down usage.

Atom automatically sets NODE_ENV to 'production' unless you launch it with --dev.

@PEM--
Copy link

PEM-- commented May 30, 2017

Ha ha, clash of usage. It would be better to ship it in production. Lighter, for sure.

@PEM--
Copy link

PEM-- commented May 30, 2017

Something could be done here, I could avoid tuning the process.env.NODE_ENV as BufferedProcess can accept it's own set of ENV. That would avoid this sad behavior thought that would still mean that you're shipping a package in development and make you prone to process.env.NODE_ENV modifications. Eventually, that would not solve this issue, solely the link to meteor-helper package.

@matthewwithanm
Copy link
Contributor

Great minds… 😊

That would be awesome if you could make that change. Handling the mutation of process.env in Nuclide seems like an edge case that isn't worth the cost since it would make using dependencies that require React themselves a huge pain. Also, I'm sure that other packages using React (like the new GitHub one) are just requiring it without compiling it too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants