jordanbyron / react-native-quick-actions

A react-native interface for Touch 3D home screen quick actions
MIT License
1.06k stars 93 forks source link

Unable to resolve path to module #65

Closed Dexwell closed 6 years ago

Dexwell commented 6 years ago

Hey, thank you for this awesome library! 💖

It works great, however my ESLint is complaining:

Unable to resolve path to module 'react-native-quick-actions'.

Despite installation through npm. Other packages don't have this issue. Could you look into this?

jordanbyron commented 6 years ago

Hey Dexwell. Sounds like you've got a configuration problem with ESLint and/or your package setup. You're better off posting this to Stackoverflow or an equivalent site. This tracker is for bug reports and feature requests for react-native-quick-actions. I doubt ESLint expects package maintainers to do anything special to support their linter, but if you find there is something this library should be doing feel free to open a PR and I'll gladly review it.

Dexwell commented 6 years ago

I think I figured out what caused it. Your package has separate index.ios.js and index.android.js files. Most other packages have one index.js file that includes the appropriate files based on the platform. This is probably what ESLint was looking for.

Anyway, adding this to my ESLint fixed it for me.

"settings": {
  "import/resolver": {
    "node": {
      "extensions": [
        ".js",
        ".android.js",
        ".ios.js"
      ]
    }
  }
}