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.

cssLoader.issuer field removal is causing build processes depending on it to fail

See original GitHub issue

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64 Binaries: Node: 16.18.0 npm: 8.19.2 Yarn: 3.1.1 pnpm: N/A Relevant packages: next: 13.0.1 eslint-config-next: 13.0.1 react: 18.2.0 react-dom: 18.2.0

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

Nx

Describe the Bug

Upgrading from next@13.0.0 to next@13.0.1 will cause the following packages that rely on NextJs to fail:

  • next-transpile-modules
  • Nx plugin for NextJs

The reason being that these two dependencies (and probably others) rely on the cssLoader.issuer field that has been removed in this PR: https://github.com/vercel/next.js/pull/42106/files

Both next-transpile-modules and Nx plugin for NextJs seem to rely on this field to perform the bundling.

Expected Behavior

The build process should work (as per next@13.0.0). However, the build processes fails with next@13.0.1 due to the removal of the issuer field in the exposed CSS loader.

Link to reproduction

https://github.com/terrymun/nextjs-cssloader-issuer

To Reproduce

  1. Checkout the repository at https://github.com/terrymun/nextjs-cssloader-issuer
  2. Notice that next-transpile-modules has been installed and is used to transpile lodash as an example
  3. Run npm run dev. The error message will appear TypeError: Cannot read properties of undefined (reading 'and'), as the issuer field has been removed as of next@13.0.1
  4. Downgrade to next@13.0.0 by running npm install -D next@13.0.0
  5. Rerun npm run dev, and notice the server starts normally.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
chrishornmemcommented, Nov 1, 2022

@martpie confirmed working on my side after upgrading to next-transpile-modules@10.0.0. Many thanks for super fast turnaround 😃

1reaction
martpiecommented, Nov 1, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

React Universal Webpack CSS-loader issue
This occurs when running two instances of webpack, one for the client and one for the server. The client compile fine, however the...
Read more >
How I solved and debugged my Webpack issue through ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >
MiniCssExtractPlugin
This plugin extracts CSS into separate files. It creates a CSS file per JS file which contains CSS. It supports On-Demand-Loading of CSS...
Read more >
Handling common JavaScript problems - MDN Web Docs
This includes information on using browser dev tools to track down and fix problems, using Polyfills and libraries to work around problems, ...
Read more >
Webpack issue loading CSS
Topic: Webpack issue loading CSS ... import 'bootstrap-css-only/css/bootstrap.min.css' import ... "style-loader": "^1.0.0". What could be causing the error?
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