remix icon indicating copy to clipboard operation
remix copied to clipboard

After updating to 1.7.2 from 1.6.8: TypeError: (0 , import_react.useMatches) is not a function

Open msevestre opened this issue 2 years ago • 3 comments

What version of Remix are you using?

1.7.2

Steps to Reproduce

We updated our app to version 1.7.2 from 1.6.8 yesterday. There seems to be an issue, both in development and in production. When we refresh a page using the useMatches hook, we are now getting the following error

TypeError: (0 , import_react.useMatches) is not a function
    at AssessmentPageRoute (/app_path/app/routes/page/$pageName.tsx:27:25)
    at renderWithHooks (/app_path/node_modules/react-dom/cjs/react-dom-server.node.development.js:5724:16)
    at renderIndeterminateComponent (/app_path/node_modules/react-dom/cjs/react-dom-server.node.development.js:5797:15)
    at renderElement (/app_path/node_modules/react-dom/cjs/react-dom-server.node.development.js:6012:7)
    at renderNodeDestructiveImpl (/app_path/node_modules/react-dom/cjs/react-dom-server.node.development.js:6170:11)
    at renderNodeDestructive (/app_path/node_modules/react-dom/cjs/react-dom-server.node.development.js:6142:14)
    at renderContextProvider (/app_path/node_modules/react-dom/cjs/react-dom-server.node.development.js:5986:3)
    at renderElement (/app_path/node_modules/react-dom/cjs/react-dom-server.node.development.js:6083:11)

navigating to the route works perfectly.

Expected Behavior

We expect the useMatches hook to be a function

Actual Behavior

The application crashes and there is nothing we can do here but to close the app

msevestre avatar Sep 27 '22 12:09 msevestre

upstream issue with esbuild, looking into updating our dependency now :)

https://github.com/evanw/esbuild/issues/2534

mcansh avatar Sep 27 '22 16:09 mcansh

Same error on my application after changing remix version to 1.7.2

nkrmr avatar Nov 02 '22 10:11 nkrmr

@nkrmr do you mean 1.7.4? Bug was reported on 1.7.2 and the fix haven't been merged yet, see #4301

machour avatar Nov 02 '22 10:11 machour

Closed by #4301

MichaelDeBoey avatar Nov 19 '22 01:11 MichaelDeBoey