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 i'm getting this error when adding SSR to exist angular 6 project

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 5 years ago
  • Comments:9

github_iconTop GitHub Comments

24reactions
camolift29commented, Jun 27, 2019

I found a solution. After trying different ways for fixing this bug, I found that when you execute the command ng add @ng-toolkit/universal, in package.json appears the new dependency, but in 1.1.2 version (at least for me). Then I searched in official page of ng-toolkit-universal and the last version is 7.1.2. So I deleted the node_modules folder, then I’ve changed the version in package.json to 7.1.2, I executed the command npm install, then ng add @ng-toolkit/universal@7.1.2 and it worked!

I hope this option help you.

And sorry if a made a mistake in my english writting. I’m from Latin America.

9reactions
TheAngularGuycommented, Jun 29, 2019

It seems ng add @ng-toolkit/universal@7.1.2 did the trick for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'unshift' of undefined AngularJS
StorageService has no property called favorites.. · It's because localStorage. · StorageService exposes only whats returned (getAll, add, remove).
Read more >
ng-toolkit/universal ERROR: Cannot read property 'unshift' of ...
ERROR: Cannot read property 'unshift' of undefined i'm getting this error when adding SSR to exist angular 6 project · Issue #578 ......
Read more >
Cannot Read Property 'Unshift' Of Undefined - ADocLib
Uncaught TypeError : Cannot read property 'load' of undefined It works fine if I ... i'm getting this error when adding SSR to...
Read more >
cannot read properties of undefined angular - You.com
The problem is that as an Input variable, the reminders object is initially undefined until angular has finished initializing the component. See this...
Read more >
T187386 Cannot read property 'unshift' of undefined
TypeError : Cannot read property 'unshift' of undefined at ... Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 14 2018, ...
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