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

Potential isRequired bug in v15.8.0 and above #376

Open
paulchan14 opened this issue Mar 11, 2022 · 10 comments
Open

Potential isRequired bug in v15.8.0 and above #376

paulchan14 opened this issue Mar 11, 2022 · 10 comments

Comments

@paulchan14
Copy link

We have been encountering the following error in our web app when using v15.8.0 or higher. We are using a micro front end-style setup, so I haven't ruled out that it may just be something with our setup - but it works fine at v15.7.2 ---

...application `appName` died in status LOADING_SOURCE_CODE: Cannot read properties of undefined (reading 'isRequired')
     at objectName.methodCall (Component.js:1:__)

At the given line, the component is using func.isRequired. We also have a usage of string.isRequired, but it crashes at the first instance. Looking through the changelog entry for v15.8.0, I don't see anything relating to the isRequired property.

For now, we're reverting to an earlier version, but please let me know if you have any ideas for the more recent versions.

Thanks

@ljharb
Copy link
Collaborator

ljharb commented Mar 11, 2022

Have you tried v15.8.1? #370 might be related.

@ljharb
Copy link
Collaborator

ljharb commented Mar 11, 2022

Also, what is "died in status LOADING_SOURCE_CODE" from?

You can see here: https://npm.runkit.com/prop-types that propTypes.func.isRequired is a function, as is propTypes.func.

@paulchan14
Copy link
Author

paulchan14 commented Mar 11, 2022

Have you tried v15.8.1? #370 might be related.

Yes, we were on v15.8.1 when we noticed the error, then I worked backwards until it worked on v15.7.2

Also, what is "died in status LOADING_SOURCE_CODE" from?

I think that's part of our error boundary setup.

@ljharb
Copy link
Collaborator

ljharb commented Mar 11, 2022

I wonder if it’s some kind of bundle splitting or duplication issue. What is the value of PropTypes?

@ankurparihar

This comment was marked as off-topic.

@ljharb

This comment was marked as off-topic.

@ankurparihar

This comment was marked as off-topic.

@ljharb

This comment was marked as off-topic.

@ankurparihar

This comment was marked as off-topic.

@ljharb
Copy link
Collaborator

ljharb commented Dec 7, 2022

ping @paulgpeterson, any update?

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

No branches or pull requests

3 participants