Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

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
Contributor

ljharb commented Mar 11, 2022

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

@ljharb
Copy link
Contributor

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
Contributor

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
Contributor

ljharb commented Dec 7, 2022

ping @paulgpeterson, any update?

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