react-native-picker / picker

Picker is a cross-platform UI component for selecting an item from a list of options.
MIT License
1.49k stars 280 forks source link

Unable to resolve module @react-native-picker/picker from #383

Open bigbean17 opened 2 years ago

bigbean17 commented 2 years ago

Error: Unable to resolve module @react-native-picker/picker from

C:\Users\user\Desktop\proj\app\Share\Header.js: @react-native-picker/picker could not be found within the project or in these directories: node_modules ........\node_modules

If you are sure the module exists, try these steps:

  1. Clear watchman watches: watchman watch-del-all
  2. Delete node_modules and run yarn install
  3. Reset Metro's cache: yarn start --reset
dsound-zz commented 2 years ago

I'm getting this too. No matter what steps I follow both for installation and fixing the recommended fixes, still does not read the module.

  "@babel/preset-env": "7.9.5",
    "@babel/preset-react": "7.9.4",
    "@babel/preset-typescript": "7.9.0",
    "@react-native-picker/picker": "^2.3.0",
    "@types/jest": "25.2.1",
    "@types/react": "16.9.34",
    "@types/react-native": "0.62.2",
    "@types/webpack-env": "1.15.1",
import { Picker as SelectPicker } from '@react-native-picker/picker'

I'm on a mac.

bigbean17 commented 2 years ago

@dsound-zz I used another module instead, I spent 3 hours trying to figure out what happened but have no progress.

tgprudencio commented 2 years ago

I just got this problem in my project right after I uninstalled other plugin (lol)... but I could make it work after recreating the node_modules and installing the react-native-picker/picker again

chinmay4github1987 commented 2 years ago

Please help me cannot able to integrate the picker library giving error while installing the dependencies

goldylucks commented 2 years ago

Guys put your metro and babel config here.

Also, try to run the package with a freshly installed RNA project, to see if the problem is in your source code of the specific project or in the machine.

gridphp commented 1 year ago

I am also stucked here, any solution?

"dependencies": { "@react-native-community/netinfo": "^5.6.2", "@react-native-picker/picker": "^2.4.10", "axios": "^0.19.2", "babel-plugin-module-resolver": "^4.0.0", "babel-polyfill": "^6.26.0", "d3-scale": "^3.2.1", "d3-scale-chromatic": "^1.5.0", "d3-shape": "^1.3.7", "luxon": "^1.22.0", "metro-react-native-babel-preset": "^0.76.3", "ramda": "^0.27.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-native": "^0.68.6", "react-native-cli": "^2.0.1", "react-native-fs": "^2.16.6", "react-native-iphone-x-helper": "^1.2.1", "react-native-navigation": "^7.32.1", "react-native-share": "^3.1.1", "react-native-splash-screen": "^3.3.0", "react-native-svg": "^12.0.3", "react-native-track-player": "^3.2.0", "react-native-video": "^6.0.0-alpha.0", "react-native-view-pdf": "^0.10.1", "react-native-webview": "^11.22.7", "react-redux": "^7.2.0", "redux": "^4.0.5", "redux-saga": "^1.1.3", "redux-thunk": "^2.3.0", "styled-components": "^5.0.1" }, "devDependencies": { "@babel/core": "^7.6.2", "@babel/runtime": "^7.6.2", "@react-native-community/eslint-config": "^0.0.5", "babel-jest": "^24.9.0", "eslint": "^6.5.1", "jest": "^24.9.0", "react-native-onesignal": "^4.5.1", "react-test-renderer": "16.9.0" }, "jest": { "preset": "react-native" } }

bigbean17 commented 1 year ago

I am also stucked here, any solution?

"dependencies": { "@react-native-community/netinfo": "^5.6.2", "@react-native-picker/picker": "^2.4.10", "axios": "^0.19.2", "babel-plugin-module-resolver": "^4.0.0", "babel-polyfill": "^6.26.0", "d3-scale": "^3.2.1", "d3-scale-chromatic": "^1.5.0", "d3-shape": "^1.3.7", "luxon": "^1.22.0", "metro-react-native-babel-preset": "^0.76.3", "ramda": "^0.27.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-native": "^0.68.6", "react-native-cli": "^2.0.1", "react-native-fs": "^2.16.6", "react-native-iphone-x-helper": "^1.2.1", "react-native-navigation": "^7.32.1", "react-native-share": "^3.1.1", "react-native-splash-screen": "^3.3.0", "react-native-svg": "^12.0.3", "react-native-track-player": "^3.2.0", "react-native-video": "^6.0.0-alpha.0", "react-native-view-pdf": "^0.10.1", "react-native-webview": "^11.22.7", "react-redux": "^7.2.0", "redux": "^4.0.5", "redux-saga": "^1.1.3", "redux-thunk": "^2.3.0", "styled-components": "^5.0.1" }, "devDependencies": { "@babel/core": "^7.6.2", "@babel/runtime": "^7.6.2", "@react-native-community/eslint-config": "^0.0.5", "babel-jest": "^24.9.0", "eslint": "^6.5.1", "jest": "^24.9.0", "react-native-onesignal": "^4.5.1", "react-test-renderer": "16.9.0" }, "jest": { "preset": "react-native" } }

Nah I used another module.

gridphp commented 1 year ago

I am also stucked here, any solution? "dependencies": { "@react-native-community/netinfo": "^5.6.2", "@react-native-picker/picker": "^2.4.10", "axios": "^0.19.2", "babel-plugin-module-resolver": "^4.0.0", "babel-polyfill": "^6.26.0", "d3-scale": "^3.2.1", "d3-scale-chromatic": "^1.5.0", "d3-shape": "^1.3.7", "luxon": "^1.22.0", "metro-react-native-babel-preset": "^0.76.3", "ramda": "^0.27.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-native": "^0.68.6", "react-native-cli": "^2.0.1", "react-native-fs": "^2.16.6", "react-native-iphone-x-helper": "^1.2.1", "react-native-navigation": "^7.32.1", "react-native-share": "^3.1.1", "react-native-splash-screen": "^3.3.0", "react-native-svg": "^12.0.3", "react-native-track-player": "^3.2.0", "react-native-video": "^6.0.0-alpha.0", "react-native-view-pdf": "^0.10.1", "react-native-webview": "^11.22.7", "react-redux": "^7.2.0", "redux": "^4.0.5", "redux-saga": "^1.1.3", "redux-thunk": "^2.3.0", "styled-components": "^5.0.1" }, "devDependencies": { "@babel/core": "^7.6.2", "@babel/runtime": "^7.6.2", "@react-native-community/eslint-config": "^0.0.5", "babel-jest": "^24.9.0", "eslint": "^6.5.1", "jest": "^24.9.0", "react-native-onesignal": "^4.5.1", "react-test-renderer": "16.9.0" }, "jest": { "preset": "react-native" } }

Nah I used another module.

Which one ?