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

"Cannot read property 'Workspace' of undefined" after upgrading to Angular v11 #119

Closed
TonySpegel opened this issue Nov 12, 2020 · 6 comments

Comments

@TonySpegel
Copy link

TonySpegel commented Nov 12, 2020

Hi after upgrading Angular to v11 I've got this error:

> ng deploy --base-href=/test-project/ --no-silent

❌ An error occurred when trying to deploy:
Cannot read property 'Workspace' of undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] deploy: `ng deploy --base-href=/test-project/ --no-silent`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I'm sorry if isn't related to the update but it has been working before that

@JohannesHoppe
Copy link
Member

see #118, we are working on a fix. Please stay tuned. 👍

@TonySpegel
Copy link
Author

oh my bad, I'm sorry. Haven't seen this.

@JohannesHoppe
Copy link
Member

No problem at all. Let's keep it open so that other people are aware, too.

@JohannesHoppe JohannesHoppe reopened this Nov 12, 2020
@Githamza
Copy link

Same here :/

@JohannesHoppe
Copy link
Member

I'm actively working on a fix, which includes a breaking change. So I would like to deliver a solution that will make the transition as easy as possible. See PR #120

If you can't wait, then please use the standalone CLI version of angular-cli-ghpages. This version works without any dependencies to Angular:
https://www.github.com/angular-schule/angular-cli-ghpages/tree/master/docs%2FREADME_standalone.md

@JohannesHoppe
Copy link
Member

Thanks for the patience!

angular-cli-ghpages v1.0.0-rc.1 with support for Angular v11 is out. Please give it a try and report any issues here!

Fixed via #118 and #120.
Release notes: https://github.com/angular-schule/angular-cli-ghpages/releases/tag/v1.0.0-rc.1


Please note the ⚠️ BREAKING CHANGE (v1)

Starting with version 1 the option --configuration was renamed to --build-target.

BEFORE (does not work):

ng deploy --configuration=test

NOW:

ng deploy --build-target=test

If you use the old syntax, you will probably receive the following error:

An unhandled exception occurred: Configuration 'test' is not set in the workspace.

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

3 participants