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.

styled-components required dep after upgrading to nx 9.2.2

See original GitHub issue

Expected Behavior

I can run the nx build command without npm installing styled-components package.

Current Behavior

What is the current behavior? After upgrading from nx 9.0.0 to nx 9.2.2, I can’t build my react app. I get the following msg

ERROR in ./app/App.jsx
Module not found: Error: Can't resolve 'styled-components' in 'foo/apps/bar/src/app'

We use emotion and never relied on styled-components.

When I npm installed styled-components, then the build command works again.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

update to 9.2.2 and run nx build <appname>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
jaysoocommented, Apr 16, 2020

This will be patched in the next version. Moving beyond that, I think we should actually generate the .babelrc for each project so overriding options is more straighforward.

1reaction
brianmcdcommented, Apr 17, 2020

Thanks a ton, @jaysoo!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Releases - styled-components
now using stylis v4 (if using stylis-plugin-rtl you'll need to upgrade to the newer version); dropped $as and $forwardedAs props (use as or...
Read more >
Painlessly Build and Deploy Next.js Apps With Nx | by Jack Hsu
This is the recommended way to deploy you Nx + Next.js apps. ... Say you want to use SCSS for styling components, then...
Read more >
Upgrade and Revert/Downgrade Guide - Product documentation
This guide describes how to manually upgrade, downgrade, or revert an ONTAP cluster or a. MetroCluster configuration using the nondisruptive or disruptive ...
Read more >
Styled-components v4 not compatible with Atlaskit
I need to upgrade to styled-components v4 because new packages added to ... there a multiple UI errors when running with v4: npm...
Read more >
Effective React Development with Nx
This component injects a global stylesheet into our application when used. It is particularly useful for overriding global style rules such as ...
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