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.

cannot read properties of undefined on swcMinify

See original GitHub issue

I’ve been getting these kind of errors poping up a lot when using swcMinify on version 12.1.2

Cannot read properties of undefined (reading 'lib')

FYI this was working in the previous version. 12.1.0

The error was happening in auth0.js, cryptojs & I also experienced it in styled-components.

I found this reference to the error and disabling swcMinify does fix it.

https://github.com/brix/crypto-js/issues/415

_Originally posted by @moshie in https://github.com/vercel/next.js/discussions/30237#discussioncomment-2484107_

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
kdy1commented, Apr 12, 2022

I think this is fixed on canary Can you try it?

1reaction
balazsorban44commented, Apr 1, 2022

I see @kdy1 is already on it https://github.com/vercel/next.js/discussions/30237#discussioncomment-2484174 but could you create a small reproduction and link it here so we can easily verify when the issue is fixed? 🙏

(Note, please use the bug report issue template next time)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read properties of undefined (reading 'call') on Next ...
I'm sure the error is not about the URL as I already added the domain to be whitelisted in my next.config.js file. Here...
Read more >
cannot read properties of undefined (reading 'module')
I'm getting a compilation error that says "Cannot read properties of undefined (reading 'module'). ERROR in ./node_modules/canvg/lib/index.es.
Read more >
TerserWebpackPlugin
If you use Circle CI or any other environment that doesn't provide real available count of CPUs ... SourceMapInput | undefined, minifyOptions: {...
Read more >
Advanced Features: Next.js Compiler
SWC Minifier stable. v12.2.0, SWC Plugins experimental support added. v12.1.0, Added support for Styled Components, Jest, Relay, Remove React Properties, ...
Read more >
Firebase production Error: ReferenceError - reactjs
TypeError : Cannot read properties of undefined (reading ... I also found out that there are several issues about swcMinify in production ...
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