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 'serialize' of undefined #1900

Closed
borntodesign opened this Issue Aug 30, 2016 · 19 comments

Comments

Projects
None yet
@borntodesign

borntodesign commented Aug 30, 2016

Trying to use sass on main global stylesheet:

ng set defaults.styleExt scss

Error:

Cannot read property 'serialize' of undefined
TypeError: Cannot read property 'serialize' of undefined
at /Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/schema-tree.ts:235:87
at JsonSerializer.property (/Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/serializer.ts💯9)
at _loop_1 (/Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/schema-tree.ts:235:32)
at /Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/schema-tree.ts:240:17
at JsonSerializer.object (/Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/serializer.ts:88:9)
at ObjectSchemaTreeNode.serialize (/Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/schema-tree.ts:227:20)
at /Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/schema-tree.ts:231:92
at JsonSerializer.property (/Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/serializer.ts💯9)
at _loop_1 (/Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/schema-tree.ts:231:36)
at /Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/schema-tree.ts:240:17
at JsonSerializer.object (/Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/serializer.ts:88:9)
at ObjectSchemaTreeNode.serialize (/Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/schema-tree.ts:227:20)
at /Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/schema-tree.ts:293:33
at JsonSerializer.array (/Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/serializer.ts:107:9)
at ArraySchemaTreeNode.serialize (/Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/schema-tree.ts:291:20)
at /Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/schema-tree.ts:231:92
at JsonSerializer.property (/Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/serializer.ts💯9)
at _loop_1 (/Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/schema-tree.ts:231:36)
at /Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/schema-tree.ts:240:17
at JsonSerializer.object (/Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/serializer.ts:88:9)
at RootSchemaTreeNode.ObjectSchemaTreeNode.serialize (/Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/schema-tree.ts:227:20)
at GeneratedSchemaClass.SchemaClassBase.$$serialize (/Users/lorne/projects/hsi-magazine/node_modules/angular-cli/addon/ng2/models/json-schema/schema-class-factory.ts:141:25)

@RicardoVaranda

This comment has been minimized.

Show comment
Hide comment
@RicardoVaranda

RicardoVaranda Aug 31, 2016

Contributor

Can confirm this, here are the steps to replicate this issue:

  1. Create angular-cli project beta 10
  2. Update angular-cli to latest webpack following:
    https://github.com/angular/angular-cli/blob/master/WEBPACK_UPDATE.md
  3. use the following command in terminal:
    ng set defaults.styleExt scss
Contributor

RicardoVaranda commented Aug 31, 2016

Can confirm this, here are the steps to replicate this issue:

  1. Create angular-cli project beta 10
  2. Update angular-cli to latest webpack following:
    https://github.com/angular/angular-cli/blob/master/WEBPACK_UPDATE.md
  3. use the following command in terminal:
    ng set defaults.styleExt scss
@borntodesign

This comment has been minimized.

Show comment
Hide comment
@borntodesign

borntodesign Aug 31, 2016

Well I have been using angular cli for about two months working on a large
app with lots of different libraries installed. So my problem could be to
do with upgrading as well. I did follow the guide :)

On Wednesday, 31 August 2016, Ricardo Varanda notifications@github.com
wrote:

Can confirm this, here are the steps to replicate this issue:

  1. Create angular-cli project beta 10
  2. Update angular-cli to latest webpack following:
    https://github.com/angular/angular-cli/blob/master/WEBPACK_UPDATE.md
    https://github.com/angular/angular-cli/blob/master/WEBPACK_UPDATE.md
  3. use the following command in terminal: ng set defaults.styleExt scss


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1900 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEUSGj5fjoOJBeK4l_wvyYQZt0evVcAaks5qlMqKgaJpZM4Jwqrj
.

borntodesign commented Aug 31, 2016

Well I have been using angular cli for about two months working on a large
app with lots of different libraries installed. So my problem could be to
do with upgrading as well. I did follow the guide :)

On Wednesday, 31 August 2016, Ricardo Varanda notifications@github.com
wrote:

Can confirm this, here are the steps to replicate this issue:

  1. Create angular-cli project beta 10
  2. Update angular-cli to latest webpack following:
    https://github.com/angular/angular-cli/blob/master/WEBPACK_UPDATE.md
    https://github.com/angular/angular-cli/blob/master/WEBPACK_UPDATE.md
  3. use the following command in terminal: ng set defaults.styleExt scss


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1900 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEUSGj5fjoOJBeK4l_wvyYQZt0evVcAaks5qlMqKgaJpZM4Jwqrj
.

@neojack647

This comment has been minimized.

Show comment
Hide comment
@neojack647

neojack647 Aug 31, 2016

I received the same exact error with 'ng set defaults.styleExt less' after upgrading my app this morning.
Error:
TypeError: Cannot read property 'serialize' of undefined
at C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:235:87
at JsonSerializer.property (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\serializer.ts💯9)
at _loop_1 (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:235:32)
at C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:240:17
at JsonSerializer.object (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\serializer.ts:88:9)
at ObjectSchemaTreeNode.serialize (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:227:20)
at C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:231:92
at JsonSerializer.property (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\serializer.ts💯9)
at _loop_1 (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:231:36)
at C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:240:17
at JsonSerializer.object (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\serializer.ts:88:9)
at ObjectSchemaTreeNode.serialize (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:227:20)
at C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:293:33
at JsonSerializer.array (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\serializer.ts:107:9)
at ArraySchemaTreeNode.serialize (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:291:20)
at C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:231:92
at JsonSerializer.property (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\serializer.ts💯9)
at _loop_1 (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:231:36)
at C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:240:17
at JsonSerializer.object (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\serializer.ts:88:9)
at RootSchemaTreeNode.ObjectSchemaTreeNode.serialize (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:227:20)
at GeneratedSchemaClass.SchemaClassBase.$$serialize (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-class-factory.ts:141:25)

neojack647 commented Aug 31, 2016

I received the same exact error with 'ng set defaults.styleExt less' after upgrading my app this morning.
Error:
TypeError: Cannot read property 'serialize' of undefined
at C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:235:87
at JsonSerializer.property (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\serializer.ts💯9)
at _loop_1 (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:235:32)
at C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:240:17
at JsonSerializer.object (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\serializer.ts:88:9)
at ObjectSchemaTreeNode.serialize (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:227:20)
at C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:231:92
at JsonSerializer.property (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\serializer.ts💯9)
at _loop_1 (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:231:36)
at C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:240:17
at JsonSerializer.object (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\serializer.ts:88:9)
at ObjectSchemaTreeNode.serialize (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:227:20)
at C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:293:33
at JsonSerializer.array (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\serializer.ts:107:9)
at ArraySchemaTreeNode.serialize (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:291:20)
at C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:231:92
at JsonSerializer.property (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\serializer.ts💯9)
at _loop_1 (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:231:36)
at C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:240:17
at JsonSerializer.object (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\serializer.ts:88:9)
at RootSchemaTreeNode.ObjectSchemaTreeNode.serialize (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-tree.ts:227:20)
at GeneratedSchemaClass.SchemaClassBase.$$serialize (C:\git\aws.clients\oms-allocation-testing\node_modules\angular-cli\addon\ng2\models\json-schema\schema-class-factory.ts:141:25)

@neojack647

This comment has been minimized.

Show comment
Hide comment
@neojack647

neojack647 Aug 31, 2016

angular-cli@1.0.0-beta.11-webpack.8 is what was installed with the update.

neojack647 commented Aug 31, 2016

angular-cli@1.0.0-beta.11-webpack.8 is what was installed with the update.

@neojack647

This comment has been minimized.

Show comment
Hide comment
@neojack647

neojack647 Aug 31, 2016

$ ng --version
angular-cli: 1.0.0-beta.11-webpack.8
node: 5.7.1
os: win32 ia32
$ node --version
v5.7.1

neojack647 commented Aug 31, 2016

$ ng --version
angular-cli: 1.0.0-beta.11-webpack.8
node: 5.7.1
os: win32 ia32
$ node --version
v5.7.1

@neojack647

This comment has been minimized.

Show comment
Hide comment
@neojack647

neojack647 Aug 31, 2016

Same issue as #1905

neojack647 commented Aug 31, 2016

Same issue as #1905

@borntodesign

This comment has been minimized.

Show comment
Hide comment
@borntodesign

borntodesign Aug 31, 2016

I did get it to work manually by setting the default style extension to scss in angular-cli.json. I also had to restart the server.

borntodesign commented Aug 31, 2016

I did get it to work manually by setting the default style extension to scss in angular-cli.json. I also had to restart the server.

@dessalines

This comment has been minimized.

Show comment
Hide comment
@dessalines

dessalines Sep 4, 2016

What's that line look like in angular-cli.json, to use scss?

dessalines commented Sep 4, 2016

What's that line look like in angular-cli.json, to use scss?

@johnkorzhuk

This comment has been minimized.

Show comment
Hide comment
@johnkorzhuk

johnkorzhuk Sep 4, 2016

"defaults": {
"styleExt": "scss" }

johnkorzhuk commented Sep 4, 2016

"defaults": {
"styleExt": "scss" }

@intellix

This comment has been minimized.

Show comment
Hide comment
@intellix

intellix Sep 23, 2016

Contributor

SCSS was introduced as the new "main syntax" in version 3, six years ago: https://github.com/sass/sass/releases/tag/3.0.0

I feel like the .sass extension should be deprecated :P Are people still using it?

Contributor

intellix commented Sep 23, 2016

SCSS was introduced as the new "main syntax" in version 3, six years ago: https://github.com/sass/sass/releases/tag/3.0.0

I feel like the .sass extension should be deprecated :P Are people still using it?

@omargon

This comment has been minimized.

Show comment
Hide comment
@omargon

omargon Sep 26, 2016

@borntodesign I follow your steps manually setting the styleExt to scss, but if I rename the main style.css to style.scss I get the following error:

ERROR in multi styles
Module not found: Error: Can't resolve '/src/styles.css' in '/node_modules/angular-cli/models'
 @ multi styles

Did you have to change anything else?

omargon commented Sep 26, 2016

@borntodesign I follow your steps manually setting the styleExt to scss, but if I rename the main style.css to style.scss I get the following error:

ERROR in multi styles
Module not found: Error: Can't resolve '/src/styles.css' in '/node_modules/angular-cli/models'
 @ multi styles

Did you have to change anything else?

@RomanTheOne

This comment has been minimized.

Show comment
Hide comment
@RomanTheOne

RomanTheOne Sep 27, 2016

@omargon I believe you have to change the styles within your angular-cli.json to:
"styles": [ "styles.scss" ],

RomanTheOne commented Sep 27, 2016

@omargon I believe you have to change the styles within your angular-cli.json to:
"styles": [ "styles.scss" ],

@borntodesign

This comment has been minimized.

Show comment
Hide comment
@borntodesign

borntodesign Sep 27, 2016

Of course make sure you restart your server as well ;) something I did not
do at first lol

On Tuesday, 27 September 2016, RomanTheOne notifications@github.com wrote:

@omargon https://github.com/omargon I believe you have to change the
styles within your angular-cli.json to:
"styles": [
"styles.scss"
],


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1900 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEUSGp-j2X8JdPg8VP4HDBmlBgyS_i8uks5quGStgaJpZM4Jwqrj
.

borntodesign commented Sep 27, 2016

Of course make sure you restart your server as well ;) something I did not
do at first lol

On Tuesday, 27 September 2016, RomanTheOne notifications@github.com wrote:

@omargon https://github.com/omargon I believe you have to change the
styles within your angular-cli.json to:
"styles": [
"styles.scss"
],


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1900 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEUSGp-j2X8JdPg8VP4HDBmlBgyS_i8uks5quGStgaJpZM4Jwqrj
.

@filipesilva

This comment has been minimized.

Show comment
Hide comment
@filipesilva

filipesilva Oct 5, 2016

Member

To be clear, the real but here is that ng set defaults.styleExt scss doesn't work, but should. We'll fix it.

Member

filipesilva commented Oct 5, 2016

To be clear, the real but here is that ng set defaults.styleExt scss doesn't work, but should. We'll fix it.

@skovmand

This comment has been minimized.

Show comment
Hide comment
@skovmand

skovmand Oct 6, 2016

Same thing applies to ng set defaults.styleExt less

skovmand commented Oct 6, 2016

Same thing applies to ng set defaults.styleExt less

@RicardoVaranda

This comment has been minimized.

Show comment
Hide comment
@RicardoVaranda

RicardoVaranda Oct 6, 2016

Contributor

The issue is in the ng set command so anything that comes after more than likely will give you an error, give it time as Filipe Silva said it's already on the Angular reams list of things to fix :)

Contributor

RicardoVaranda commented Oct 6, 2016

The issue is in the ng set command so anything that comes after more than likely will give you an error, give it time as Filipe Silva said it's already on the Angular reams list of things to fix :)

JJayet added a commit to JJayet/angular-cli that referenced this issue Oct 14, 2016

Brocco added a commit that referenced this issue Oct 19, 2016

@lirantal

This comment has been minimized.

Show comment
Hide comment
@lirantal

lirantal Oct 22, 2016

Can we re-open this as it is still reproducing with angular-cli: 1.0.0-beta.17
cc @filipesilva @borntodesign

lirantal commented Oct 22, 2016

Can we re-open this as it is still reproducing with angular-cli: 1.0.0-beta.17
cc @filipesilva @borntodesign

@RicardoVaranda

This comment has been minimized.

Show comment
Hide comment
@RicardoVaranda
Contributor

RicardoVaranda commented Oct 26, 2016

@lirantal

This comment has been minimized.

Show comment
Hide comment
@lirantal

lirantal Oct 26, 2016

Got it, thanks for clearing this up!

lirantal commented Oct 26, 2016

Got it, thanks for clearing this up!

texel pushed a commit to splice/angular-cli that referenced this issue Nov 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment