WrathChaos / react-native-header-view

Fully customizable Header View with multiple design options for React Native.
https://www.freakycoder.com
MIT License
653 stars 35 forks source link

Unable to resolve module `@freakycoder/react-native-helpers` from `node_modules/@freakycoder/react-native-header-view/lib/src/components/ClassicHeader/ClassicHeader.style.js` #12

Closed ffninja closed 4 years ago

ffninja commented 4 years ago

Hi, I'm new in React Native, tried to get run your awesome component but got this error :(

Unable to resolve module @freakycoder/react-native-helpers from node_modules/@freakycoder/react-native-header-view/lib/src/components/ClassicHeader/ClassicHeader.style.js: @freakycoder/react-native-helpers could not be found within the project.

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

  1. Clear watchman watches: watchman watch-del-all
  2. Delete node_modules: rm -rf node_modules and run yarn install
  3. Reset Metro's cache: yarn start --reset-cache
  4. Remove the cache: rm -rf /tmp/metro-*

RCTFatal __28-[RCTCxxBridge handleError:]_block_invoke _dispatch_call_block_and_release _dispatch_client_callout _dispatch_main_queue_callback_4CF CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE __CFRunLoopRun CFRunLoopRunSpecific GSEventRunModal UIApplicationMain main start

Tried followed all suggested steps but it doesn't help. All dependencies were installed.

package.json

{ "name": "NavApp", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "test": "jest", "lint": "eslint ." }, "dependencies": { "@freakycoder/react-native-header-view": "^0.5.0", "@react-native-community/masked-view": "^0.1.7", "@react-navigation/bottom-tabs": "^5.2.5", "@react-navigation/native": "^5.1.4", "@react-navigation/stack": "^5.2.9", "react": "16.11.0", "react-native": "0.62.1", "react-native-dynamic-vector-icons": "^0.1.1", "react-native-gesture-handler": "^1.6.1", "react-native-reanimated": "^1.7.1", "react-native-safe-area-context": "^0.7.3", "react-native-screens": "^2.4.0", "react-native-vector-icons": "^6.6.0" }, "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", "metro-react-native-babel-preset": "^0.58.0", "react-test-renderer": "16.11.0" }, "jest": { "preset": "react-native" } }

system info

info Fetching system and libraries information... System: OS: macOS 10.15.2 CPU: Memory: Shell: 3.2.57 - /bin/bash Binaries: Node: 10.15.3 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.4.1 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.9.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 11.3/11C29 - /usr/bin/xcodebuild Languages: Java: Not Found Python: 2.7.16 - /usr/local/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.11.0 => 16.11.0 react-native: 0.62.1 => 0.62.1 npmGlobalPackages: react-native: Not Found

Code taken from example https://github.com/WrathChaos/react-native-header-view/blob/master/example/App.js

Any ideas what could be?

WrathChaos commented 4 years ago

Hello @ffninja, Thank you for the kind words :) You need to install @freakycoder/react-native-helpers

Simply run this command: npm i @freakycoder/react-native-helpers Then it should work

ffninja commented 4 years ago

Yeah! It's works! Thanks :) Actually yeah the answer to my question was in the error 🤦‍♂️