question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Package has been ignored because it contains invalid configuration.

See original GitHub issue

After 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:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kamilkisielacommented, Dec 14, 2021

so yeah, it gets lost at some point

2reactions
kamilkisielacommented, Dec 14, 2021

lol, didn’t know you need to put package.json in package.json to import/require package.json 😄

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found