-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Comments
Can confirm this, here are the steps to replicate this issue:
|
Well I have been using angular cli for about two months working on a large On Wednesday, 31 August 2016, Ricardo Varanda [email protected]
|
I received the same exact error with 'ng set defaults.styleExt less' after upgrading my app this morning. |
[email protected] is what was installed with the update. |
$ ng --version |
Same issue as #1905 |
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. |
What's that line look like in |
"defaults": { |
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 |
@borntodesign I follow your steps manually setting the
Did you have to change anything else? |
@omargon I believe you have to change the styles within your angular-cli.json to: |
Of course make sure you restart your server as well ;) something I did not On Tuesday, 27 September 2016, RomanTheOne [email protected] wrote:
|
To be clear, the real but here is that |
Same thing applies to |
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 :) |
Can we re-open this as it is still reproducing with |
@lirantal This fix was only merged in the recent 1.0.0-beta.18: See |
Got it, thanks for clearing this up! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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:100: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:100: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:100: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)
The text was updated successfully, but these errors were encountered: