ERROR in Cannot read property 'map' of undefined
See original GitHub issueVersions
$ ng -v
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 6.0.0-rc.10
Node: 8.11.1
OS: win32 x64
Angular: 6.0.0-rc.6
... animations, common, compiler, core, forms, http
... platform-browser, platform-browser-dynamic, platform-server
... router, service-worker
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.5.13
@angular-devkit/build-angular 0.5.13
@angular-devkit/build-optimizer 0.5.13
@angular-devkit/core 0.5.13
@angular-devkit/schematics 0.5.13
@angular/cdk 6.0.0-rc.14
@angular/cli 6.0.0-rc.10
@angular/compiler-cli 5.2.10
@angular/flex-layout 6.0.0-beta.15
@angular/language-service 5.2.10
@angular/material 6.0.0-rc.14
@angular/pwa 0.5.13
@ngtools/webpack 6.0.0-rc.11
@schematics/angular 0.5.13
@schematics/update 0.5.13
rxjs 6.0.0
typescript 2.6.2
webpack 4.6.0
Repro steps
- Step 1 Follow https://next.angular.io/guide/service-worker-getting-started tutorial.
- Step 2
After add the pwa package, run
ng build --prod
- Step 3 Error occours.
Observed behavior
$ ng build --prod
Date: 2018-05-03T13:29:34.494Z
Hash: 5da3cc601afb0d2ea9a3
Time: 6390ms
chunk {0} runtime.6afe30102d8fe7337431.js (runtime) 1.05 kB [entry] [rendered]
chunk {1} styles.9b2127a46f190bf49065.css (styles) 106 kB [initial] [rendered]
chunk {2} polyfills.7b179b8b06c2bb8cdc21.js (polyfills) 130 bytes [initial] [rendered]
chunk {3} main.aad69072215eb1da4e1b.js (main) 128 bytes [initial] [rendered]
ERROR in Cannot read property 'map' of undefined
Desired behavior
Should build normaly or show me some useful output.
Mention any other details that might be useful (optional)
I’ve updated from ng5 to ng6 rc last week.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Error : Cannot read property 'map' of undefined - Stack Overflow
The error Cannot read property 'map' of undefined' is thrown when the map function in the CommentList component is executed.
Read more >Fix the "Cannot read property 'map' of undefined" Error in React
The variable you are trying to map over is undefined . It will probably eventually be an array, but due to the asynchronous...
Read more >How to Prevent the TypeError: Cannot Read Property Map of ...
As a result, the TypeError Cannot read property 'map' of undefined is very common and one of the first errors that developers will...
Read more >Cannot read properties of undefined (reading 'map') in React
The "TypeError: Cannot read properties of undefined (reading 'map')" occurs when we call the map() method on an undefined value, most often when...
Read more >React - Cannot read property 'map' of undefined - debuggr.io
React evaluate our return statement, when it hits the items.map(...) line its actually running undefined.map(...) which is obviously an error in ...
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
Fixed by removing the
import { Request } from 'express';
in line 4 from:This was not an Angular issue. This just used to work with ng5 compiler.
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.