Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
msevestre opened this issue Sep 27, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@msevestre
Copy link

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

@mcansh
Copy link
Collaborator

mcansh commented Sep 27, 2022

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

evanw/esbuild#2534

mcansh added a commit that referenced this issue Sep 29, 2022
closes #4080
closes #4280

Signed-off-by: Logan McAnsh <logan@mcan.sh>
mcansh added a commit that referenced this issue Sep 29, 2022
closes #4080
closes #4280

Signed-off-by: Logan McAnsh <logan@mcan.sh>
@machour machour added awaiting release This issue has been fixed and will be released soon bug Something isn't working and removed bug:unverified labels Oct 5, 2022
@nkrmr
Copy link

nkrmr commented Nov 2, 2022

Same error on my application after changing remix version to 1.7.2

@machour
Copy link
Collaborator

machour commented Nov 2, 2022

@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 machour removed the awaiting release This issue has been fixed and will be released soon label Nov 2, 2022
@machour machour added the awaiting release This issue has been fixed and will be released soon label Nov 18, 2022
@MichaelDeBoey
Copy link
Member

Closed by #4301

@brophdawg11 brophdawg11 removed the awaiting release This issue has been fixed and will be released soon label Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants