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

Describe the bug I’m seeing this error a lot recently across my project. I can’t say for sure when it occurred but seems to have been with some recent package updates.

Error is below

warn Package @fortawesome/pro-light-svg-icons has been ignored because it contains invalid configuration. Reason: Cannot find module '/Users/runner/work/1/s/node_modules/@fortawesome/pro-light-svg-icons/package.json.js'
warn Package @fortawesome/pro-regular-svg-icons has been ignored because it contains invalid configuration. Reason: Cannot find module '/Users/runner/work/1/s/node_modules/@fortawesome/pro-regular-svg-icons/package.json.js'
warn Package @fortawesome/pro-solid-svg-icons has been ignored because it contains invalid configuration. Reason: Cannot find module '/Users/runner/work/1/s/node_modules/@fortawesome/pro-solid-svg-icons/package.json.js'

It seems to be hanging a lot of build commands and gets thrown during a lot of react native and yarn commands.

Reproducible test case react-native run-android

Expected behavior No warning should be thrown

Desktop (please complete the following information):

Originally posted on main FontAwesome repo

Seems like its looking for package.json.js paths when it should just be package.json…?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
BasBuurcommented, Jul 28, 2022

Understood, thank you for the explanation!

I’m not the biggest fan of having local packages laying around and having to re-create the local package every time I want to use a new icon so I’ll probably just bite the faBullet. Hold the faPhone - that icon doesn’t exist? Oh well… Thanks again, I appreciate your time!

0reactions
robmadolecommented, Jul 28, 2022

Yeah sorry about forcing the change over. The problem is that react-native doesn’t support tree-shaking. And your instinct is correct, it’s just the sheer number of icons. We added a bunch in 6 and it’s a blessing and a curse.

I will say just as an alternative you could use our Desktop Subsetter and create a subset of the icons that you use. One of the things that you will get from the subset (a .zip file) is a directory of JS packages. These are formatted exactly like our full packages. You could install these and it would speed things up tremendously.

Read more comments on GitHub >

github_iconTop Results From Across the Web

warn Package undefined has been ignored because it ...
Open the package.json file and see if the bad package you uninstalled is still present. · If the bad package is still there,...
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 has been ignored because it contains invalid ...
warn Package has been ignored because it contains invalid configuration. 396 views 1 year ago. MahsaTech. MahsaTech. 59 subscribers.
Read more >
warn package react-native-vector-icons contains invalid ...
warn Package react-native-vector-icons has been ignored because it contains invalid configuration. Reason: "dependency.assets" is not allowed error Unrecognized ...
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