react-native-form-generator icon indicating copy to clipboard operation
react-native-form-generator copied to clipboard

undefined is not an object (evaluating '_react3.default.PropTypes.string')

Open GabrielBB opened this issue 7 years ago • 14 comments

I just copy the example code on the README.md and it throws this error. I think it's because something about PropTypes has changed in newer versions of React Native.

GabrielBB avatar Oct 10 '17 00:10 GabrielBB

Hey @GabrielBB I made a pull request today that goes through fixing the error you are seeing. React switched over to a different package called prop-types and that breaks it if you have a newer version.

hans0low avatar Oct 17 '17 20:10 hans0low

Did this get solved?

ccostel avatar Oct 22 '17 12:10 ccostel

@ccostel I made a PR for it but i don't think it was merged yet.

hans0low avatar Oct 23 '17 19:10 hans0low

@hans0low I actually implemented your changes and they work. Hopefully @MichaelCereda will soon merge it. Thanks for the PR :) 👍

ccostel avatar Oct 25 '17 09:10 ccostel

Still undefined is not an object (evaluating '_react3.default.PropTypes.string'). Did you update repo?

alkanyunus avatar Dec 02 '17 22:12 alkanyunus

Yeah, I also had to apply the changes of the PR manually, But it works. Thanks @hans0low

lakshyaGoel avatar Dec 03 '17 20:12 lakshyaGoel

@ccostel @hans0low is there a way of applying the PR automatically while waiting for the merge to happen? i tried suggestions here but kept running into errors.

aanchan avatar Dec 12 '17 18:12 aanchan

@aanchan

npm install MichaelCereda/react-native-form-generator#pull/124/head

I believe this should work.

hans0low avatar Dec 12 '17 22:12 hans0low

It's been a while and @MichaelCereda still did not merge. I tweeted him in the hope that it will come to his attention.

ccostel avatar Dec 29 '17 13:12 ccostel

Hi,

I'm getting error. I tried npm install MichaelCereda/react-native-form-generator#pull/124/head but I'll receiveing the following message:

npm ERR! code 1 npm ERR! Command failed: /usr/bin/git checkout pull/124/head npm ERR! error: pathspec 'pull/124/head' did not match any file(s) known to git.

I'm trting to run this using Expo. Can this be the problem ?

I ask for help on this issue.

ventocilla avatar Apr 06 '18 05:04 ventocilla

@ventocilla You might want to try manually changing the files.

As of now, the @hans0low PR has been merged. But I installed the package today, then got the "undefined is not an object (evaluating '_react3.default.PropTypes.string')" error. I took a look at the .js files that the @hans0low PR (#124) changed but my local files (that I installed today), did not have the @hans0low PR changes applied. To fix the error, I had to manually edit my local .js files to match the @hans0low PR. #

Gabriel-J-Young avatar Nov 17 '18 22:11 Gabriel-J-Young

I just installed the package today, I got this error which appears only if I only do:

import { Form } from 'react-native-form-generator'

Screen Shot 2019-04-22 at 1 03 47 PM

hopewise avatar Apr 22 '19 10:04 hopewise

@hopewise did you manage to fix it?

saravanabalagi avatar Oct 11 '19 20:10 saravanabalagi

no, I abandoned using this package..

hopewise avatar Oct 23 '19 13:10 hopewise