qlik-oss / core-get-started

Get started with Qlik Core.
MIT License
32 stars 15 forks source link

Problem with getting hello-engine to run in environment #76

Closed newmans99 closed 6 years ago

newmans99 commented 6 years ago

Description

This is a setup issue (support?) and may not be related to a problem with the code. When I run npm start hello-engine I get the error below. I have started the Qlik Core engine on the machine in a background docker container using: docker-compose up -d. I have also run the npm install before issuing npm start. I may have missed a step or didn't get one of the dependencies correct.

newmans99 commented 6 years ago

Full console information from docker compose, npm install, and npm run....

[vagrant@qmi-centos-docker-kubernetes getting-started-with-web-platform]$ docker-compose up -d
Creating network "gettingstartedwithwebplatform_default" with the default driver
Creating gettingstartedwithwebplatform_engine_1 ... 
Creating gettingstartedwithwebplatform_engine_1 ... done

[vagrant@qmi-centos-docker-kubernetes getting-started-with-web-platform]$ docker ps -a
CONTAINER ID        IMAGE                                         COMMAND                  CREATED             STATUS              PORTS                               NAMES
a27860a65cec        qlikea/engine:12.134.0                        "/usr/local/bin/engi…"   4 seconds ago       Up 3 seconds        9090/tcp, 0.0.0.0:19076->9076/tcp   gettingstartedwithwebplatform_engine_1
a7ea7c8aabbf        k8s.gcr.io/k8s-dns-sidecar-amd64              "/sidecar --v=2 --lo…"   17 hours ago        Up 17 hours                                             k8s_sidecar_kube-dns-54cccfbdf8-6sxjd_kube-system_58b3d9f7-0dde-11e8-83da-0800278a706a_0
6db4eb909438        k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64        "/dnsmasq-nanny -v=2…"   17 hours ago        Up 17 hours                                             k8s_dnsmasq_kube-dns-54cccfbdf8-6sxjd_kube-system_58b3d9f7-0dde-11e8-83da-0800278a706a_0
dae3f66cde78        k8s.gcr.io/k8s-dns-kube-dns-amd64             "/kube-dns --domain=…"   17 hours ago        Up 17 hours                                             k8s_kubedns_kube-dns-54cccfbdf8-6sxjd_kube-system_58b3d9f7-0dde-11e8-83da-0800278a706a_0
731163b21e18        k8s.gcr.io/kubernetes-dashboard-amd64         "/dashboard --insecu…"   17 hours ago        Up 17 hours                                             k8s_kubernetes-dashboard_kubernetes-dashboard-77d8b98585-cz9sz_kube-system_5898df63-0dde-11e8-83da-0800278a706a_0
70a42fe57e72        gcr.io/k8s-minikube/storage-provisioner       "/storage-provisioner"   17 hours ago        Up 17 hours                                             k8s_storage-provisioner_storage-provisioner_kube-system_5847389a-0dde-11e8-83da-0800278a706a_0
9c410a253304        gcr.io/google_containers/pause-amd64:3.0      "/pause"                 17 hours ago        Up 17 hours                                             k8s_POD_kube-dns-54cccfbdf8-6sxjd_kube-system_58b3d9f7-0dde-11e8-83da-0800278a706a_0
c1c4ed8a2150        gcr.io/google_containers/pause-amd64:3.0      "/pause"                 17 hours ago        Up 17 hours                                             k8s_POD_kubernetes-dashboard-77d8b98585-cz9sz_kube-system_5898df63-0dde-11e8-83da-0800278a706a_0
6388acf69a3d        gcr.io/google_containers/pause-amd64:3.0      "/pause"                 17 hours ago        Up 17 hours                                             k8s_POD_storage-provisioner_kube-system_5847389a-0dde-11e8-83da-0800278a706a_0
4d5ae9e6f454        gcr.io/google-containers/kube-addon-manager   "/opt/kube-addons.sh"    17 hours ago        Up 17 hours                                             k8s_kube-addon-manager_kube-addon-manager-qmi-centos-docker-kubernetes_kube-system_c4c3188325a93a2d7fb1714e1abf1259_0
c97d4c2fdd23        gcr.io/google_containers/pause-amd64:3.0      "/pause"                 17 hours ago        Up 17 hours                                             k8s_POD_kube-addon-manager-qmi-centos-docker-kubernetes_kube-system_c4c3188325a93a2d7fb1714e1abf1259_0

[vagrant@qmi-centos-docker-kubernetes getting-started-with-web-platform]$ npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none was installed.

[vagrant@qmi-centos-docker-kubernetes getting-started-with-web-platform]$ npm run hello-engine

> getting-started-with-web-platform@0.0.1 hello-engine /home/vagrant/getting-started-with-web-platform
> node ./src/hello-engine/hello-engine.js

/home/vagrant/getting-started-with-web-platform/src/hello-engine/hello-engine.js:6
(async () => {
       ^

SyntaxError: Unexpected token (
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:383:7)
    at startup (bootstrap_node.js:149:9)

npm ERR! Linux 3.10.0-693.2.2.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "hello-engine"
npm ERR! node v6.12.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! getting-started-with-web-platform@0.0.1 hello-engine: `node ./src/hello-engine/hello-engine.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the getting-started-with-web-platform@0.0.1 hello-engine script 'node ./src/hello-engine/hello-engine.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the getting-started-with-web-platform package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./src/hello-engine/hello-engine.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs getting-started-with-web-platform
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls getting-started-with-web-platform
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/vagrant/getting-started-with-web-platform/npm-debug.log
[vagrant@qmi-centos-docker-kubernetes getting-started-with-web-platform]$ 
peol commented 6 years ago

Hi @newmans99. Your Node.js+npm versions are too old. You need at least v8.9.4 of Node.js installed. Let me know if upgrading solved your issue.

newmans99 commented 6 years ago

That did it. Thank you for the fast response.