Skip to content
This repository has been archived by the owner on Aug 9, 2018. It is now read-only.

Example Broken #27

Open
daslicht opened this issue Oct 31, 2015 · 5 comments
Open

Example Broken #27

daslicht opened this issue Oct 31, 2015 · 5 comments

Comments

@daslicht
Copy link

When i run the example and visit localhost:3000 I get the following output in the console :

daslicht:weather daslicht$ node server.js
Listening on port 3000
/Users/daslicht/DEV/node/angular/angularjs-server/node_modules/angularcontext/node_modules/jsdom/lib/jsdom/level1/core.js:662
    Array.prototype.splice.call(this._childNodes, oldChildIndex, 1);
                           ^
TypeError: Cannot set property length of [object Object] which has only a getter
    at core.Node.removeChild (/Users/daslicht/DEV/node/angular/angularjs-server/node_modules/angularcontext/node_modules/jsdom/lib/jsdom/level1/core.js:662:28)
    at null.<anonymous> (/Users/daslicht/DEV/node/angular/angularjs-server/node_modules/angularcontext/node_modules/jsdom/lib/jsdom/level2/events.js:370:17)
    at proto.(anonymous function) [as removeChild] (/Users/daslicht/DEV/node/angular/angularjs-server/node_modules/angularcontext/node_modules/jsdom/lib/jsdom/utils.js:23:26)
    at null.innerHTML (/Users/daslicht/DEV/node/angular/angularjs-server/node_modules/angularcontext/node_modules/jsdom/lib/jsdom/browser/index.js:465:12)
    at createFrom.close (/Users/daslicht/DEV/node/angular/angularjs-server/node_modules/angularcontext/node_modules/jsdom/lib/jsdom/browser/index.js:160:40)
    at Object.dispose (/Users/daslicht/DEV/node/angular/angularjs-server/node_modules/angularcontext/lib/main.js:233:20)
    at /Users/daslicht/DEV/node/angular/angularjs-server/lib/main.js:28:29
    at runSources (/Users/daslicht/DEV/node/angular/angularjs-server/node_modules/angularcontext/lib/main.js:55:21)
    at /Users/daslicht/DEV/node/angular/angularjs-server/node_modules/angularcontext/lib/main.js:76:21
    at fs.js:334:14
daslicht:weather daslicht$ 
@isuvorov
Copy link

+1

@apparentlymart
Copy link
Collaborator

Hmm this error seems to be coming from the guts of jsdom. Possibly it's caused by the fact that angularcontext (the dependency of angularjs-server that itself depends on jsdom) is pinning to ~3.1.2 and I think that old jsdom version isn't compatible with newer versions of node than (IIRC?) 0.10.

Using a newer version of jsdom might help but kinda annoying since it's an indirect dependency, albeit one that I also maintain. Will try to take a look at this at some point, but to be honest it's not a high priority because our app that uses this is still running on the Node 0.10 series right now.

@namnm
Copy link

namnm commented Feb 12, 2016

+1. I have the same problem. Any solution?

@rjmackay
Copy link

rjmackay commented Jun 5, 2016

I've managed to get this partially working on my fork https://github.com/rjmackay/angularjs-server/tree/update-angular-context
However I think only the initial render is working, further navigation seems to be broken.

@pakro
Copy link

pakro commented Jul 1, 2016

@rjmackay current available version on this repo is working for me as long as I add an APPID code as query parameter for the weather API. You can register an account for free and there is a free plan available by default for evaluation purposes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants