Package has been ignored because it contains invalid configuration.
See original GitHub issueAfter updating to latest versions I’ve been getting the following warning on app startup:
warn Package @graphql-codegen/cli has been ignored because it contains invalid configuration. Reason: Cannot find module '/path/to/my/app/node_modules/@graphql-codegen/cli/package.json.js'
warn Package @graphql-codegen/fragment-matcher has been ignored because it contains invalid configuration. Reason: Cannot find module '/path/to/my/app/node_modules/@graphql-codegen/fragment-matcher/package.json.js'
warn Package @graphql-codegen/introspection has been ignored because it contains invalid configuration. Reason: Cannot find module '/path/to/my/app/node_modules/@graphql-codegen/introspection/package.json.js'
warn Package @graphql-codegen/typescript has been ignored because it contains invalid configuration. Reason: Cannot find module '/path/to/my/app/node_modules/@graphql-codegen/typescript/package.json.js'
warn Package @graphql-codegen/typescript-document-nodes has been ignored because it contains invalid configuration. Reason: Cannot find module '/path/to/my/app/node_modules/@graphql-codegen/typescript-document-nodes/package.json.js'
warn Package @graphql-codegen/typescript-graphql-files-modules has been ignored because it contains invalid configuration. Reason: Cannot find module '/path/to/my/app/node_modules/@graphql-codegen/typescript-graphql-files-modules/package.json.js'
warn Package @graphql-codegen/typescript-graphql-request has been ignored because it contains invalid configuration. Reason: Cannot find module '/path/to/my/app/node_modules/@graphql-codegen/typescript-graphql-request/package.json.js'
warn Package @graphql-codegen/typescript-operations has been ignored because it contains invalid configuration. Reason: Cannot find module '/path/to/my/app/node_modules/@graphql-codegen/typescript-operations/package.json.js'
I haven’t changed anything related to GraphQL Codegen. I’m on TypeScript 4.4.2, and here is the relevant part of my DEV dependencies:
"devDependencies": {
...
"@graphql-codegen/cli": "2.1.1",
"@graphql-codegen/fragment-matcher": "3.1.0",
"@graphql-codegen/introspection": "2.1.0",
"@graphql-codegen/typescript": "2.1.2",
"@graphql-codegen/typescript-document-nodes": "2.1.2",
"@graphql-codegen/typescript-graphql-files-modules": "2.1.0",
"@graphql-codegen/typescript-graphql-request": "^4.1.2",
"@graphql-codegen/typescript-operations": "2.1.2",
...
}
To Reproduce Have the latest versions of GraphQL codegen for TypeScript in your dev dependencies, run your app, check console.
Expected behavior The warning shouldn’t display.
Environment:
OS: macOS 11.3.1
@graphql-codegen/...
: See above
NodeJS: 14.17.2
Additional context
This wasn’t the case before updating to latest versions. Note that this is a minor annoyance, not a breaking bug or anything. Everything still work as expected otherwise.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
warn Package undefined has been ignored because it ...
warn Package undefined has been ignored because it contains invalid configuration. Reason: Cannot find module 'undefined/package.json'.
Read more >Package react-native-webview has been ignored because it ...
Bug description: I am trying to use react-native-webview and following step. But it doesn't work. yarn add react-native-webview cd ios ...
Read more >Package has been Ignored because it contains Invalid ...
This react native warning will finally leads to build error while trying to run your application. So, how to fix this particular error?...
Read more >warn package react-native-vector-icons contains ... - You.com
contains invalid configuration : "dependency.assets" is not allowed. Please verify it's properly linked using "react-native config" command and contact .
Read more >guys i am getting this error. warn Package react-native-vector ...
guys i am getting this error. warn Package react-native-vector-icons has been ignored because it contains invalid configuration. Reason: " ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
so yeah, it gets lost at some point
lol, didn’t know you need to put
package.json
inpackage.json
to import/requirepackage.json
😄