tl;dr: On a new Linux box, with Node.js v6.10.3, is it possible to get cql_runner up and running?
I'm finding it impossible to get all of the npm dependencies installed successfully to run cql_runner. I'm not that familiar with the nodejs/npm ecosystem so I might be missing something that's obvious to others, but I've been battling this for several hours so figure I'd ask for help.
I have a fresh Ubuntu 17.04 box. I've downloaded the current node.js LTS version from nodejs.org, v6.10.3 and added it to my path.
Following the cql_runner readme, I first npm install -g [email protected]
. That's where the first problem comes up; it can't find that version but mentions that the old angular-cli package name is deprecated and it's under @angular/cli now. So instead I npm install -g @angular/[email protected]
, which gets further but leaves an unmet peer dependency:
npm WARN @angular/[email protected] requires a peer of zone.js@^0.8.4 but none was installed.
Doing some research about npm, it sounds like at some point not all dependencies automatically install, so I should manually install. I try npm install -g zone.js@^0.8.4
. That seems to complete successfully by installing [email protected], but if I do a npm ls -g
I still end up with:
npm ERR! peer dep missing: zone.js@^0.8.4, required by @angular/[email protected]
...which seems odd, because 0.8.11 should be compatible with 0.8.4, but let's try explicitly installing 0.8.4 with npm install -g [email protected]
. Still get the same error from npm ls -g
, even though in that tree it prints out [email protected] is now explicitly listed as installed. Maybe some downstream changes that aren't supported by the 1.0.0 release candidate of @angular/cli?
Anyway, not sure how important that remaining zone.js dependency is, let's move on to cql_runner itself, continuing to follow the readme.
npm install -g
... completed without errors or warning!
Now to the local dependencies: npm install
. Here's where we end up with a lot of warnings about unmet dependencies:
npm WARN @ng-bootstrap/[email protected] requires a peer of @angular/core@^4.0.3 but none was installed.
npm WARN @ng-bootstrap/[email protected] requires a peer of @angular/common@^4.0.3 but none was installed.
npm WARN @ng-bootstrap/[email protected] requires a peer of @angular/forms@^4.0.3 but none was installed.
npm WARN @angular/[email protected] requires a peer of typescript@^2.1.5 but none was installed.
npm WARN [email protected] requires a peer of typescript@^2.1.0 but none was installed.
If I ignore those warnings and proceed to ng build
, it finishes with the following warnings:
WARNING in ./~/@ng-bootstrap/ng-bootstrap/buttons/radio.js
108:12-21 "export 'Renderer2' was not found in '@angular/core'
WARNING in ./~/@ng-bootstrap/ng-bootstrap/buttons/radio.js
212:12-21 "export 'Renderer2' was not found in '@angular/core'
WARNING in ./~/@ng-bootstrap/ng-bootstrap/datepicker/datepicker-input.js
188:12-21 "export 'Renderer2' was not found in '@angular/core'
WARNING in ./~/@ng-bootstrap/ng-bootstrap/modal/modal-window.js
61:12-21 "export 'Renderer2' was not found in '@angular/core'
WARNING in ./~/@ng-bootstrap/ng-bootstrap/popover/popover.js
119:12-21 "export 'Renderer2' was not found in '@angular/core'
WARNING in ./~/@ng-bootstrap/ng-bootstrap/tooltip/tooltip.js
131:12-21 "export 'Renderer2' was not found in '@angular/core'
WARNING in ./~/@ng-bootstrap/ng-bootstrap/typeahead/typeahead.js
224:12-21 "export 'Renderer2' was not found in '@angular/core'
If I forge ahead and cd src && ng server
, I get the same warnings but the server starts up. When I open localhost:4200 in the browser, there's just a page that says "Loading..." indefinitely. The JavaScript console in the browser shows the same warnings about Renderer2 not found.
So I'm guessing some of those NPM warnings about missing dependencies are, indeed, relevant. But here's what I just get stuck. First I try manually installing those missing dependencies from the earlier npm install
run: npm install @angular/[email protected] @angular/[email protected] @angular/[email protected] [email protected] [email protected]
. That says there is no 2.1.0 of typescript, so remove that from the command and hope 2.1.5 satisfies everything.
That command completes, but now there are even more unmet dependencies:
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of zone.js@^0.8.4 but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
So if I keep going down the rabbit hole of manually installing the specific versions of all the dependencies listed here, I can never get to the end. It always ends up either adding new dependencies on different versions of the same things, or I end up with some invalid packages.
Thinking "maybe the older NPM versions that tried to automatically satisfy more peer dependencies can solve this for me," I started over with Node.js v4.8.3 and its corresponding npm 2 version. Again following the instructions in the cql_runner readme, didn't get much father... it fails installing the dependencies.
As I stated at the beginning I really don't know much about the node and npm ecosystem, so I'm stuck here and don't know if a) I'm doing something totally wrong related to npm, or b) if the cql_runner project isn't currently in a state that I should expect to be able to get it up and running. Any insight would be appreciated!