question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR: Cannot read property 'unshift' of undefined

See original GitHub issue

I’m submitting a…


[ ] Bug report  
[ ] Feature request
[ ] Documentation issue or request

In package


[ ] @ng-toolkit/init
[ ] @ng-toolkit/serverless
[ ] @ng-toolkit/universal
[ ] @ng-toolkit/pwa
[ ] @ng-toolkit/firebug

Current behavior

Expected behavior

Minimal reproduction of the problem with instructions

Example repository

What is the motivation / use case for changing the behavior?

Environment


Angular version: X.Y.Z


- Node version: XX  
- Platform:  

Others:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:12

github_iconTop GitHub Comments

8reactions
camolift29commented, Jun 27, 2019

I have resolved this problem in another thread. When you execute ng add @ng-toolkit/universal, it adds the 1.1.2 version (At least for me) so I decided to change the version to 7.1.2 which is the last version, then I deleted node_modules folder and reinstalled all dependencies with npm i. Finally I executed ng add @ng-toolkit/universal@7.1.2 and it worked

2reactions
hbk899commented, Jul 11, 2019

I have resolved this problem in another thread. When you execute ng add @ng-toolkit/universal, it adds the 1.1.2 version (At least for me) so I decided to change the version to 7.1.2 which is the last version, then I deleted node_modules folder and reinstalled all dependencies with npm i. Finally I executed ng add @ng-toolkit/universal@7.1.2 and it worked

Was this getting error unshift error again so first i did npm i @ng-toolkit/universal@7.1.2 then ng add @ng-toolkit/universal@7.1.2 and it worked for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'unshift' of undefined - Stack Overflow
For the error log, it seems that this.books is not initialized. Can you initialize books variable in bookservice.ts to empty array like ...
Read more >
"Cannot Read Property Unshift of Undefined" #124 - GitHub
Encounter an error about "Cannot read property unshift of undefined" ... The json parameter is an empty object & json.extends errors out to ......
Read more >
Cannot read property 'unshift' of undefined while trying to ...
Coding example for the question Cannot read property 'unshift' of undefined while trying to unshift a json object-mongodb.
Read more >
How to Fix TypeError: Cannot read Property 'push' of ...
When working with JavaScript arrays, you have to be careful that you are not calling the push() , pop() , shift() , unShift()...
Read more >
TypeError: Cannot read property 'unshift' - Wappler Community
I am trying to see if I get a basic mobile Framework 7 blanc template running on a phone. So I created a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found