trying to run NextJS build I got this error
I am using NextJS version 12.1.6, I tried to remove node_module and package.lock.json but it did not work
any suggestion, please
TypeError: Cannot set property 'kind' of undefined
at transformBlockScopedVariable (/application/node_modules/#babel/plugin-transform-block-scoping/lib/index.js:122:41)
at PluginPass.VariableDeclaration (/application/node_modules/#babel/plugin-transform-block-scoping/lib/index.js:81:9)
at i (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:373015)
at NodePath._call (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:292626)
at NodePath.call (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:292450)
at NodePath.visit (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:293401)
at TraversalContext.visitQueue (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:286761)
at TraversalContext.visitMultiple (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:286362)
at TraversalContext.visit (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:287032)
at Function.traverse.node (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:288552)
I am using
react-table#7.7.0 and
#types/react-table#7.7.9
Together with react-table-config.d.ts
from this answer.
In my project, I have a table that uses the useExpanded plugin and works perfectly. But when I add useRowSelect and toggleRowSelected is called it crashes. I tried to create a simple example of that error with js but I couldn't.
Things I tried:
Setting selectedRowIds manually using the initialState of the
table works.
Adding the useGroupBy plugin doesn't help. I thought it might help since the error is related to isGrouped.
Using toggleRowSelected(rowId) instead of row.toggleRowSelected() doesn't help.
The error message:
Uncaught TypeError: Cannot read properties of undefined (reading 'isGrouped')
at handleRowById (useRowSelect.js:157:1)
at useRowSelect.js:166:1
at Array.forEach (<anonymous>)
at handleRowById (useRowSelect.js:166:1)
at reducer$8 (useRowSelect.js:170:1)
at useTable.js:124:1
at Array.reduce (<anonymous>)
at useTable.js:117:1
at updateReducer (react-dom.development.js:15318:1)
at Object.useReducer (react-dom.development.js:16425:1)
at Object.useReducer (react.development.js:1512:1)
at useTable (useTable.js:57:1)
at LeftTable (index.tsx:137:1)
at renderWithHooks (react-dom.development.js:14985:1)
at updateFunctionComponent (react-dom.development.js:17356:1)
at beginWork (react-dom.development.js:19063:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)
at invokeGuardedCallback (react-dom.development.js:4056:1)
at beginWork$1 (react-dom.development.js:23964:1)
at performUnitOfWork (react-dom.development.js:22776:1)
at workLoopSync (react-dom.development.js:22707:1)
at renderRootSync (react-dom.development.js:22670:1)
at performSyncWorkOnRoot (react-dom.development.js:22293:1)
at react-dom.development.js:11327:1
at unstable_runWithPriority (scheduler.development.js:468:1)
at runWithPriority$1 (react-dom.development.js:11276:1)
at flushSyncCallbackQueueImpl (react-dom.development.js:11322:1)
at flushSyncCallbackQueue (react-dom.development.js:11309:1)
at discreteUpdates$1 (react-dom.development.js:22420:1)
at discreteUpdates (react-dom.development.js:3756:1)
at dispatchDiscreteEvent (react-dom.development.js:5889:1)
Here is the codesandbox (doesn't recreate the problem)
I'm working on a Wordpress site I did not set up and it is using Timber with a modified Gesso theme. Whenever I go to edit a post or page it loads a blank screen. Nothing appears on the front end but here are the numerous errors from the console:
Uncaught SyntaxError: missing ) after argument list
post.php?post=157&action=edit:87 Uncaught ReferenceError: _ is not defined
at post.php?post=157&action=edit:87
post.php?post=157&action=edit:151 Uncaught ReferenceError: wp is not defined
at post.php?post=157&action=edit:151
at post.php?post=157&action=edit:152
post.php?post=157&action=edit:157 Uncaught ReferenceError: wp is not defined
at post.php?post=157&action=edit:157
at post.php?post=157&action=edit:168
post.php?post=157&action=edit:188 Uncaught ReferenceError: wp is not defined
at post.php?post=157&action=edit:188
at post.php?post=157&action=edit:192
post.php?post=157&action=edit:201 Uncaught ReferenceError: wp is not defined
at post.php?post=157&action=edit:201
at post.php?post=157&action=edit:202
post.php?post=157&action=edit:206 Uncaught ReferenceError: wp is not defined
at post.php?post=157&action=edit:206
post.php?post=157&action=edit:211 Uncaught ReferenceError: moment is not defined
at post.php?post=157&action=edit:211
post.php?post=157&action=edit:217 Uncaught ReferenceError: wp is not defined
at post.php?post=157&action=edit:217
at post.php?post=157&action=edit:218
post.php?post=157&action=edit:226 Uncaught ReferenceError: wp is not defined
at post.php?post=157&action=edit:226
at post.php?post=157&action=edit:227
post.php?post=157&action=edit:239 Uncaught ReferenceError: wp is not defined
at post.php?post=157&action=edit:239
at post.php?post=157&action=edit:240
post.php?post=157&action=edit:245 Uncaught TypeError: Cannot read property 'editor' of undefined
at post.php?post=157&action=edit:245
post.php?post=157&action=edit:249 Uncaught ReferenceError: wp is not defined
at post.php?post=157&action=edit:249
post.php?post=157&action=edit:256 Uncaught ReferenceError: wp is not defined
at post.php?post=157&action=edit:256
at post.php?post=157&action=edit:257
post.php?post=157&action=edit:269 Uncaught ReferenceError: wp is not defined
at post.php?post=157&action=edit:269
at post.php?post=157&action=edit:270
post.php?post=157&action=edit:277 Uncaught ReferenceError: wp is not defined
at post.php?post=157&action=edit:277
at post.php?post=157&action=edit:278
post.php?post=157&action=edit:319 Uncaught ReferenceError: wp is not defined
at post.php?post=157&action=edit:319
post.php?post=157&action=edit:2199 Uncaught ReferenceError: acf is not defined
at post.php?post=157&action=edit:2199
post.php?post=157&action=edit:2203 Uncaught ReferenceError: acf is not defined
at post.php?post=157&action=edit:2203
post.php?post=157&action=edit:2207 Uncaught ReferenceError: acf is not defined
at post.php?post=157&action=edit:2207
at post.php?post=157&action=edit:2212
load-scripts.php?c=1&load[]=hoverIntent,common,admin-bar,heartbeat,postbox,wp-dom-ready,wp-plugins&ver=5.2.4:7 Uncaught TypeError: Cannot read property 'createContext' of undefined
at Module.377 (load-scripts.php?c=1&load[]=hoverIntent,common,admin-bar,heartbeat,postbox,wp-dom-ready,wp-plugins&ver=5.2.4:7)
at n (load-scripts.php?c=1&load[]=hoverIntent,common,admin-bar,heartbeat,postbox,wp-dom-ready,wp-plugins&ver=5.2.4:7)
at wp.plugins.0 (load-scripts.php?c=1&load[]=hoverIntent,common,admin-bar,heartbeat,postbox,wp-dom-ready,wp-plugins&ver=5.2.4:7)
at load-scripts.php?c=1&load[]=hoverIntent,common,admin-bar,heartbeat,postbox,wp-dom-ready,wp-plugins&ver=5.2.4:7
post.php?post=157&action=edit:2237 Uncaught TypeError: Cannot read property 'setLocaleData' of undefined
at post.php?post=157&action=edit:2237
at post.php?post=157&action=edit:2238
post.php?post=157&action=edit:2257 Uncaught TypeError: Cannot read property 'setLocaleData' of undefined
at post.php?post=157&action=edit:2257
at post.php?post=157&action=edit:2258
post.php:2681 Uncaught ReferenceError: tinymce is not defined
at post.php:2681
data.min.js:1 Uncaught TypeError: Cannot read property 'flowRight' of undefined
at Module.363 (data.min.js:1)
at r (data.min.js:1)
at wp.data.0 (data.min.js:1)
at data.min.js:1
shortcode.min.js:1 Uncaught TypeError: Cannot read property 'extend' of undefined
at Module.352 (shortcode.min.js:1)
at n (shortcode.min.js:1)
at wp.shortcode.2 (shortcode.min.js:1)
at shortcode.min.js:1
blocks.min.js:2 Uncaught TypeError: Cannot read property 'combineReducers' of undefined
at Module.362 (blocks.min.js:2)
at r (blocks.min.js:1)
at wp.blocks.0 (blocks.min.js:1)
at blocks.min.js:1
keycodes.min.js:1 Uncaught TypeError: Cannot read property 'mapValues' of undefined
at Module.382 (keycodes.min.js:1)
at r (keycodes.min.js:1)
at wp.keycodes.1 (keycodes.min.js:1)
at keycodes.min.js:1
rich-text.min.js:1 Uncaught TypeError: Cannot read property 'combineReducers' of undefined
at Module.361 (rich-text.min.js:1)
at r (rich-text.min.js:1)
at wp.richText.0 (rich-text.min.js:1)
at rich-text.min.js:1
components.min.js:19 Uncaught TypeError: Cannot read property 'stubTrue' of undefined
at e (components.min.js:19)
at e (components.min.js:19)
at compose.min.js:1
at Module.<anonymous> (components.min.js:19)
at n (components.min.js:1)
at components.min.js:1
at components.min.js:1
core-data.min.js:1 Uncaught TypeError: Cannot read property 'createRegistryControl' of undefined
at Module.364 (core-data.min.js:1)
at r (core-data.min.js:1)
at wp.coreData.132 (core-data.min.js:1)
at core-data.min.js:1
viewport.min.js:1 Uncaught TypeError: Cannot read property 'registerStore' of undefined
at Module.372 (viewport.min.js:1)
at n (viewport.min.js:1)
at wp.viewport.2 (viewport.min.js:1)
at viewport.min.js:1
block-editor.min.js:55 Uncaught TypeError: Cannot read property 'flow' of undefined
at Module.357 (block-editor.min.js:55)
at n (block-editor.min.js:1)
at wp.blockEditor.0 (block-editor.min.js:1)
at block-editor.min.js:1
notices.min.js:1 Uncaught TypeError: Cannot read property 'registerStore' of undefined
at Module.371 (notices.min.js:1)
at r (notices.min.js:1)
at wp.notices.15 (notices.min.js:1)
at notices.min.js:1
nux.min.js:1 Uncaught TypeError: Cannot read property 'combineReducers' of undefined
at Module.375 (nux.min.js:1)
at n (nux.min.js:1)
at wp.nux.0 (nux.min.js:1)
at nux.min.js:1
editor.min.js:17 Uncaught TypeError: Cannot read property 'SETTINGS_DEFAULTS' of undefined
at Module.358 (editor.min.js:17)
at n (editor.min.js:1)
at wp.editor.0 (editor.min.js:1)
at editor.min.js:1
block-library.min.js:23 Uncaught TypeError: Cannot read property 'withFallbackStyles' of undefined
at Module.<anonymous> (block-library.min.js:23)
at n (block-library.min.js:1)
at Module.<anonymous> (block-library.min.js:25)
at Module.<anonymous> (block-library.min.js:25)
at n (block-library.min.js:1)
at block-library.min.js:1
at block-library.min.js:1
editor-block-3-15-1.js:1 Uncaught TypeError: Cannot read property 'Placeholder' of undefined
at Module.<anonymous> (editor-block-3-15-1.js:1)
at r (editor-block-3-15-1.js:1)
at Object.<anonymous> (editor-block-3-15-1.js:1)
at r (editor-block-3-15-1.js:1)
at editor-block-3-15-1.js:1
at editor-block-3-15-1.js:1
compose.min.js:1 Uncaught TypeError: Cannot read property 'flowRight' of undefined
at Module.compose (compose.min.js:1)
at Module.360 (edit-post.min.js:12)
at n (edit-post.min.js:1)
at wp.editPost.0 (edit-post.min.js:1)
at edit-post.min.js:1
format-library.min.js:12 Uncaught TypeError: Cannot read property 'withSpokenMessages' of undefined
at Module.367 (format-library.min.js:12)
at n (format-library.min.js:1)
at wp.formatLibrary.0 (format-library.min.js:1)
at format-library.min.js:1
wp-seo-structured-data-blocks-1240.min.js:1 Uncaught TypeError: Cannot read property 'IconButton' of undefined
at Object.868 (wp-seo-structured-data-blocks-1240.min.js:1)
at f (commons-1240.min.js:1)
at Object.849 (wp-seo-structured-data-blocks-1240.min.js:1)
at f (commons-1240.min.js:1)
at Object.848 (wp-seo-structured-data-blocks-1240.min.js:1)
at f (commons-1240.min.js:1)
at Object.847 (wp-seo-structured-data-blocks-1240.min.js:1)
at f (commons-1240.min.js:1)
at t (commons-1240.min.js:1)
at Array.r [as push] (commons-1240.min.js:1)
annotations.min.js:1 Uncaught TypeError: Cannot read property 'registerStore' of undefined
at Module.370 (annotations.min.js:1)
at e (annotations.min.js:1)
at wp.annotations.1 (annotations.min.js:1)
at annotations.min.js:1
compose.min.js:1 Uncaught TypeError: Cannot read property 'flowRight' of undefined
at Module.compose (compose.min.js:1)
at Object.<anonymous> (wp-seo-post-scraper-1240.min.js:5)
at f (commons-1240.min.js:1)
at Object.<anonymous> (wp-seo-post-scraper-1240.min.js:5)
at f (commons-1240.min.js:1)
at Object.<anonymous> (wp-seo-post-scraper-1240.min.js:5)
at f (commons-1240.min.js:1)
at Object.<anonymous> (wp-seo-post-scraper-1240.min.js:5)
at f (commons-1240.min.js:1)
at Object.<anonymous> (wp-seo-post-scraper-1240.min.js:5)
post.php:2245 Uncaught TypeError: Cannot read property 'initializeEditor' of undefined
at HTMLDocument.<anonymous> (post.php:2245)
If I deactivate the plugin I can access just fine, edit, and then all is normal again when I reactivate. The setup of this host is a little odd so I'm thinking it is a path issue but I can't quite figure out where that should be adjusted looking at the documentation and other folk's issues around the web.
Versions are:
WP 5.2.4
Timber 1.9.4 (that shows a warning not to upgrade. I can paste here if that's helpful but not sure if this is related. I tried updating to the new version and that did not help.)
Advanced Custom Fields PRO 5.8.6 (Might not be relevant but figured I would include in case)
Hosted on Pantheon
Turns out it was a specific way of deferring javascript that was interfering. This is a pretty common function to add to wp but it interferes with Timber. For now I just turned it off but I'm sure if you just added relevant js files to bypass it would be fine but I will probably choose a more robust solution for deferring js going forward.
function defer_parsing_of_js ( $url ) {
if ( FALSE === strpos( $url, '.js' ) ) return $url;
if ( strpos( $url, 'jquery.js' ) ) return $url;
return "$url' defer ";
}
add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );
I am trying to play around mixing Polymer (1.0) & Meteor (1.1.0.2). I am trying to use Template.dynamic (http://docs.meteor.com/#/full/template_dynamic) and trying to set the value of template name using helpers as {{> Template.dynamic template=whichMainPanelHelper }} I am getting the below exception:
Exception from Tracker recompute function:
debug.js:41 Error: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
at Error (native)
at DOMRange.detach (https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:512:24)
at DOMRange.setMembers (https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:471:12)
at doMaterialize (https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2019:22)
at Object.Tracker.nonreactive (https://socioui-rohanray.c9.io/packages/tracker.js?6d0890939291d9780f7e2607ee3af3e7f98a3d9c:593:12)
at doRender (https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2015:17)
at https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:1865:18
at Function.Template._withTemplateInstanceFunc (https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:3476:12)
at https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:1864:29
at Object.Blaze._withCurrentView (https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2197:12)
globalClient.js?2215a2ab608267b0be3f49b7779cbbe0e07bea5b:4 helper : whichMainPanel : drawerPanelMain
debug.js:41 Exception from Tracker recompute function:
debug.js:41 Error: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
at Error (native)
at DOMRange.detach (https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:512:24)
at DOMRange.setMembers (https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:471:12)
at doMaterialize (https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2019:22)
at Object.Tracker.nonreactive (https://socioui-rohanray.c9.io/packages/tracker.js?6d0890939291d9780f7e2607ee3af3e7f98a3d9c:593:12)
at doRender (https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2015:17)
at https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:1865:18
at Function.Template._withTemplateInstanceFunc (https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:3476:12)
at https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:1864:29
at Object.Blaze._withCurrentView (https://socioui-rohanray.c9.io/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2197:12)
I have done a repo in Cloud 9 # https://ide.c9.io/rohanray/socioui
can be checked live # https://socioui-rohanray.c9.io
I'm getting following exception thrown:
=> Meteor server restarted
I20130820-00:17:58.852(3)? Exception from setTimeout callback: { stack: [Getter] } MongoError: $or requires nonempty array
I20130820-00:17:58.852(3)? at Object.Future.wait (/home/alexei/.meteor/tools/4010e5731d/lib/node_modules/fibers/future.js:326:15)
I20130820-00:17:58.853(3)? at _.extend._nextObject (packages/mongo-livedata/mongo_driver.js:540)
I20130820-00:17:58.853(3)? at _.extend.forEach (packages/mongo-livedata/mongo_driver.js:570)
I20130820-00:17:58.853(3)? at _.extend.map (packages/mongo-livedata/mongo_driver.js:582)
I20130820-00:17:58.853(3)? at _.extend.fetch (packages/mongo-livedata/mongo_driver.js:606)
I20130820-00:17:58.853(3)? at _.each.Cursor.(anonymous function) [as fetch] (packages/mongo-livedata/mongo_driver.js:444)
I20130820-00:17:58.854(3)? at MongoConnection.findOne (packages/mongo-livedata/mongo_driver.js:362)
I20130820-00:17:58.854(3)? at _.extend.findOne (packages/mongo-livedata/collection.js:225)
I20130820-00:17:58.854(3)? at _.extend.findOne (packages/collectionFS/collectionFS_common.js:4)
I20130820-00:17:58.855(3)? at _.extend.checkQueue (packages/collectionFS/collectionFS_filehandlers.js:95)
I20130820-00:17:58.855(3)? - - - - -
I20130820-00:17:58.855(3)? at Object.toError (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/utils.js:110:11)
I20130820-00:17:58.855(3)? at Cursor.nextObject.self.queryRun (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/cursor.js:634:54)
I20130820-00:17:58.856(3)? at Cursor.close (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/cursor.js:903:5)
I20130820-00:17:58.856(3)? at Cursor.nextObject.commandHandler (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/cursor.js:634:21)
I20130820-00:17:58.856(3)? at Db._executeQueryCommand (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/db.js:1658:9)
I20130820-00:17:58.856(3)? at Server.Base._callHandler (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/connection/base.js:378:41)
I20130820-00:17:58.856(3)? at Server.connect.connectionPool.on.server._serverState (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/connection/server.js:468:18)
I20130820-00:17:58.857(3)? at MongoReply.parseBody (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
I20130820-00:17:58.857(3)? at Server.connect.connectionPool.on.server._serverState (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/connection/server.js:426:20)
I20130820-00:17:58.857(3)? at EventEmitter.emit (events.js:96:17)
Please advise, what is causing the problem?
I'm on 0.6.5 meteor, 0.6.6 mrt, 0.10.13 node and 1.3.2 npm.
BTW, application itself works fine :)
Please advise.
Thank you,
Alexei
The query inside your Meteor.setTimeout block of code has an $or keyword which contains an empty array. You need to have at least two items in there for your operation.
If you're having trouble/using some kind of way to build an $or query you could update your code with this block of code so we could be of further help