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

fix: error->importing picker from react-native core is deprecated #3230

Merged
merged 9 commits into from
Sep 4, 2020

Conversation

Simranjit1080
Copy link
Contributor

imported picker from @react-native-community/picker

Copy link
Contributor

@alexandrtovmach alexandrtovmach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's incorrect way to import Picker. Should be named import:

import { Picker } from '@react-native-community/picker';

See example from docs:
https://www.npmjs.com/package/@react-native-community/picker#usage-1

@alexandrtovmach
Copy link
Contributor

@akhil-geekyants @sankhadeeproy007 @SupriyaKalghatgi @shivrajkumar
Pay attention to this PR, because it seems like urgent

@Simranjit1080
Copy link
Contributor Author

It's incorrect way to import Picker. Should be named import:

import { Picker } from '@react-native-community/picker';

See example from docs:
https://www.npmjs.com/package/@react-native-community/picker#usage-1

fixed the imports.

@bradiosd
Copy link

bradiosd commented Sep 1, 2020

I have started a new project and it's causing me issues with this error. Seems like this needs to go in quite quick. This happens whenever I use any component that has a dependency on the picker.

ERROR Warning: Picker has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-community/picker' instead of 'react-native'. See https://github.com/react-native-community/react-native-picker

EDIT: It doesn't actually prevent the app from working but does give an ugly ERROR message when it's re-bundled to the device.

@shivrajkumar shivrajkumar merged commit 5fbb479 into GeekyAnts:master Sep 4, 2020
@alexandrtovmach
Copy link
Contributor

@shivrajkumar Thanks for merging 👍 How about making release and publish it to NPM?

@alexandrtovmach
Copy link
Contributor

Friendly reminder 🔝
@akhil-geekyants @sankhadeeproy007 @SupriyaKalghatgi @shivrajkumar

@alexandrtovmach
Copy link
Contributor

Ping

@alexandrtovmach
Copy link
Contributor

Please
@akhil-geekyants @sankhadeeproy007 @SupriyaKalghatgi @shivrajkumar

@fdkitlui
Copy link

fdkitlui commented Sep 24, 2020

It's almost there.
node_modules/native-base/package.json

"main": "dist/src/index.js",
changed to:
"main": "src/index.js",

if we wanna edit and have a temp test, use
"native-base": "https://github.com/GeekyAnts/NativeBase.git",
instead of version, it's the latest code with the changes of Picker's import.

reason:
don't use dist folder as main in node_modules/native-base/package.json, use the src folder instead, so that it would actually work for changes in https://github.com/GeekyAnts/NativeBase/pull/3230/files/16387d71682533bdab927798019710ef09663b01
(the compiled dist folder is old, however, if we run "npm run prepublish && npm run postinstall" to update the dist folder, the app would fail when launch.)

solutions:

in ourAppProject/package.json

"native-base": "^2.13.14",
changed to:
"native-base": "https://github.com/fdkitlui/NativeBase.git",

or

fork https://github.com/GeekyAnts/NativeBase.git to your own git
and change "main" entrance in native-base's package.json, push to your own git
in ourAppProject/package.json
change "native-base" to your git address

cd ourAppProjectPath
rm -rf node_modules
yarn install

@GeorgS
Copy link

GeorgS commented Sep 29, 2020

Any ETA for a new release containing this change?

@alexandrtovmach
Copy link
Contributor

Guys, I don't want to be annoying, but could you make a release?
@akhil-geekyants @sankhadeeproy007 @SupriyaKalghatgi @shivrajkumar

P.S. CI/CD can resolve this issue by automatically deploy and release after merging to master

Copy link

@leandroasilva leandroasilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@prasanthsd
Copy link

Can we please have an update on the release?

@alexandrtovmach
Copy link
Contributor

We're waiting for two months just for making a release to NPM. Why it's so hard? Give me a contributor rights, so I can do that, because seems like nobody cares about this project from the core team.
@akhil-geekyants @sankhadeeproy007 @SupriyaKalghatgi @shivrajkumar

@billnbell
Copy link
Contributor

common!!!!!!!!!!!!!

@alexandrtovmach
Copy link
Contributor

Ping

@billnbell
Copy link
Contributor

Ping again. Can someone please fix this?

@arochedy
Copy link

arochedy commented Dec 7, 2020

Now it's @react-native-picker/picker and not '@react-native-community/picker' anymore :(

Any plan to update to this new library ?

@alexandrtovmach
Copy link
Contributor

Ohhh, really? Again renamed... That's why I don't like react native, no any stability

@arochedy
Copy link

arochedy commented Dec 7, 2020

Yes I don't understand why it's change so frequently. It looks like there is no more projetc in react-community

@alexandrtovmach
Copy link
Contributor

@arochedy if you can make a PR it'll be great 👍

@armanatz
Copy link
Contributor

Now it's @react-native-picker/picker and not '@react-native-community/picker' anymore :(

Any plan to update to this new library ?

@alexandrtovmach I have made a PR to fix this issue over at #3321

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

Successfully merging this pull request may close these issues.