Error on Object Rest/Spread Properties syntax
See original GitHub issueOS?
Ubuntu 16.04
Versions.
angular-cli: 1.0.0-beta.26
node: 6.8.1
os: linux x64
@angular/common: 2.4.4
@angular/compiler: 2.4.4
@angular/compiler-cli: 2.4.4
@angular/core: 2.4.4
@angular/forms: 2.4.4
@angular/http: 2.4.4
@angular/material: 2.0.0-beta.0
@angular/platform-browser: 2.4.4
@angular/platform-browser-dynamic: 2.4.4
@angular/router: 3.4.4
Repro steps.
Use Object Rest/Spread Properties
syntax inside any file:
let a = { ...b, c };
The log given by the failure.
ERROR in ./src/app/app.component.ts
Module build failed: TypeError: Cannot read property 'kind' of undefined
at _getContentOfKeyLiteral (/home/sergey/ng2-project/node_modules/@ngtools/webpack/src/loader.js:8:13)
at /home/sergey/ng2-project/node_modules/@ngtools/webpack/src/loader.js:83:62
at Array.some (native)
at /home/sergey/ng2-project/node_modules/@ngtools/webpack/src/loader.js:83:32
at Array.filter (native)
at _removeModuleId (/home/sergey/ng2-project/node_modules/@ngtools/webpack/src/loader.js:82:10)
at /home/sergey/ng2-project/node_modules/@ngtools/webpack/src/loader.js:167:48
@ ./src/app/app.module.ts 8:0-89
Mention any other details that might be useful.
I didn’t have this error when using angular-cli: 1.0.0-beta.24
. Looks like it started failing after fix #4078.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Spread syntax (...) - JavaScript - MDN Web Docs - Mozilla
In an object literal, the spread syntax enumerates the properties of an object and adds the key-value pairs to the object being created....
Read more >An Easy Guide to Object Rest/Spread Properties in JavaScript
Object spread syntax within the object literal extracts from source objects own and enumerable properties, and copies them into the target ...
Read more >JavaScript Object Destructuring, Spread Syntax, and the Rest ...
JavaScript Object Destructuring is the syntax for extracting values from an object property and assigning them to a variable.
Read more >ECMAScript - Object Rest/Spread Properties in ES2018 (ES9)
This proposal provides the ability to use rest and spread operators on top of objects. Object Destructuring. Analogously to the array - when ......
Read more >babel/plugin-syntax-object-rest-spread
Syntax only It's unlikely you want to use this plugin directly as it only enables Babel to parse this syntax. Instead, use plugin-proposal-object-rest-spread...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Object Rest/Spread is only supported in TS 2.1 and Angular don’t officially support that yet 😃
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.