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

React Native - Warning eslint-import-resolver-typescript has been ignored because it contains invalid configuration #100

Closed
beetlebum opened this issue Mar 29, 2022 · 6 comments

Comments

@beetlebum
Copy link

When using the project in React Native 0.67 and resolver version 2.7, the following error can be observed:
warn Package eslint-import-resolver-typescript has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in /Code/GitHub/app/node_modules/eslint-import-resolver-typescript/package.json

@JounQin
Copy link
Collaborator

JounQin commented Mar 30, 2022

So why package.json should be exported for React Native?

@billnbell
Copy link
Contributor

billnbell commented Apr 1, 2022

this is normal when using exports. just add it in node_modules/eslint-import-resolver-typescript/package.json

We need to somehow fix package.json exports section.

@billnbell
Copy link
Contributor

  "exports": {
    ".": {
      "require": "./lib/index.cjs",
      "import": "./lib/index.es2015.mjs",
      "types": "./lib/index.d.ts"
    },
    "./package.json": "./package.json"
  },

@JounQin
Copy link
Collaborator

JounQin commented Apr 2, 2022

I know how to do this, I'm just wondering why package.json is required for React Native.

And PR welcome.

@billnbell
Copy link
Contributor

#101

@JounQin JounQin closed this as completed Apr 3, 2022
@JounQin
Copy link
Collaborator

JounQin commented Apr 3, 2022

released as v2.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants