Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service worker generation failed. Angular 13 upgrade #1050

Closed
blueiceprj opened this issue Nov 4, 2021 · 8 comments
Closed

Service worker generation failed. Angular 13 upgrade #1050

blueiceprj opened this issue Nov 4, 2021 · 8 comments

Comments

@blueiceprj
Copy link

I get this error message on build after updating to angular version 13. You can look at from here.

Angular issue

@abadakhshan
Copy link

abadakhshan commented Nov 4, 2021

@blueiceprj

It's related to the dependencies of @angular-builders/custom-webpack

I described it here before.

#930

The temporary solution could be deleting node-modules from node_modules\@angular-builders\custom-webpack

@blueiceprj
Copy link
Author

I use custom webpack builder on my project. I can't do that.

@alejandroaap
Copy link

@abadakhshan After deleting that folder I am getting the following error An unhandled exception occurred: Cannot destructure property 'styles' of 'buildOptions.sourceMap' as it is undefined.

@abadakhshan
Copy link

I use custom webpack builder on my project. I can't do that.

Don't delete node_modules\@angular-builders\custom-webpack

You just should delete node_modules\@angular-builders\custom-webpack\node-modules

@abadakhshan
Copy link

abadakhshan commented Nov 4, 2021

@abadakhshan After deleting that folder I am getting the following error An unhandled exception occurred: Cannot destructure property 'styles' of 'buildOptions.sourceMap' as it is undefined.

@alejandroaap
Yes, You are exactly where I am.

I found what is the root cause of this error and I am trying to fix it.

If you check the node-modules\@angular-devkit\architect version, you find that the version is 0.1202.13. But it should be 0.1300.1.

It could be a side-effect of version conflict.

I'm still on it to solve the problem.

I think we have to wait for the #1051 to be merged.

@alejandroaap
Copy link

@abadakhshan Thanks for your reply. Hopefully the merger doesn't delay. Greetings

@just-jeb
Copy link
Owner

just-jeb commented Nov 4, 2021

Hey guys! Yeah you're absolutely right, the issue will be resolved once the builders are updated to Angular 13 (the major versions should always match).
Currently there is some issue with Jest builder, the guys from jest-preset-angular are working on resolving it.
I expect the PR to be merged in the next few days, stay tuned.

@just-jeb just-jeb closed this as completed Nov 4, 2021
@blueiceprj
Copy link
Author

I use custom webpack builder on my project. I can't do that.

Don't delete node_modules\@angular-builders\custom-webpack

You just should delete node_modules\@angular-builders\custom-webpack\node-modules

Firstly I remove this folder and getting this error.

An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular'

Require stack:
- uaa-ui/node_modules/@angular-builders/custom-webpack/dist/browser/index.js
- uaa-ui/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js
- uaa-ui/node_modules/@angular-devkit/architect/node/index.js
- uaa-ui/node_modules/@angular/cli/models/architect-command.js
-uaa-ui/node_modules/@angular/cli/commands/build-impl.js
- uaa-ui/node_modules/@angular/cli/node_modules/@angular-devkit/schematics/tools/export-ref.js
- /uaa-ui/node_modules/@angular/cli/node_modules/@angular-devkit/schematics/tools/index.js
- /uaa-ui/node_modules/@angular/cli/utilities/json-schema.js
- /uaa-ui/node_modules/@angular/cli/models/command-runner.js
- /uaa-ui/node_modules/@angular/cli/lib/cli/index.js
- /uaa-ui/node_modules/@angular/cli/lib/init.js
See "/private/var/folders/n1/0rhwf_mj3gq7lk0jkd5gtk3h0000gn/T/ng-cgj51A/angular-errors.log" for further details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants