An unhandled exception occurred: Class extends value undefined is not a constructor or null

See original GitHub issue

Trying to run ng build of my app and I am getting the “An unhandled exception occurred: Class extends value undefined is not a constructor or null” error. Any help would be greatly appreciated. Using latest of webpack-subresource-integrity, latest @angular-devkit\build-angular & latest Typescript.

[error] TypeError: Class extends value undefined is not a constructor or null at Object.<anonymous> (…\ClientApp\node_modules\webpack-subresource-integrity\index.js:38:49) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at Object.<anonymous> (…I\ClientApp\node_modules@angular-devkit\build-angular\src\webpack\configs\common.js:38:41) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at Object.<anonymous> (…\ClientApp\node_modules@angular-devkit\build-angular\src\webpack\configs\index.js:21:14) at Module._compile (internal/modules/cjs/loader.js:1063:30)


node_modules\webpack-subresource-integrity\index.js:38:49 class AddLazySriRuntimeModule extends webpack_1.RuntimeModule {

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
jscheidcommented, Feb 5, 2022

No problem. Your use of storybook forces Webpack to version 4:

$ grep version node_modules/webpack/package.json
  "version": "4.44.2",

That version is incompatible with a number of other dependencies you’ve installed, including the version of our plugin that you’re using (5.1.0).

To fix this, remove storybook or enable Webpack 5 support for storybook, then ensure that you’re using Webpack 5.

I’ll leave this ticket open as a reminder to myself that we should probably print a more helpful error message in this case.

0reactions
Franccescaleecommented, Feb 6, 2022

Sorry, you said you were going to leave it open.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class extends value undefined is not a function or null - Stack ...
I was having the same issue. It turns out I was circularly importing classes, which is apparently a limitation. (See these GitHub issues: ......
Read more >
Class extends value undefined is not a constructor or null ...
Issue occurred (or just noticed) when a new `Homebridge` version appeared to be updated from `1.3.4` to `1.3.5`. I have tried - but...
Read more >
TypeError: Class extends value undefined is not a ... - Drupal
Initial searching seems to imply that this indicates an issue with a circular dependency. Might have to be a separate issue, but there...
Read more >
TypeError: Class extends value undefined is not a constructor ...
[moved to issue] Tutorial problem: TypeError: Class extends value undefined is not a constructor or null - Get Help and Help Others -...
Read more >
typeerror class extends value undefined is not a constructor or ...
The problem exists regardless of file structure: the only structure guaranteed to avoid it is a single giant JS file. The solution is...
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