1

After cloning the ui examples I run into following error message:

~/workspace/m2m-cumulocity-ui-plugin-examples$ c8y install latest /usr/local/lib/node_modules/cumulocity-tools/cli/options.js:33
    let t = program.target;
    ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/cumulocity-tools/cli/bin.js:5:17)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)

Where do I have to set the strict_mode? I thought it must be set in options.js as pointed to in the error message. But that won't work. Any ideas?

Thank you.

edited: I made a step back and switched to another Machine without Proxy settings and tried to install the cumulocity-tools again.

This time I get:

 npm i cumulocity-tools -g
/usr/local/lib
└── (empty)

npm ERR! Linux 4.4.0-79-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "cumulocity-tools" "-g"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64

npm ERR! Please include the following file with any support request:
npm ERR!     /home/c8y/npm-debug.log
npm ERR! code 1

npm seems to be outdated so I updated it first. I needed to switch off the Proxy settings of git with

Git config –global –unset http.proxy

and then:

 Npm update –g

After that npm was updated to v5.0.3

Again trying to install the tools:

sudo npm i cumulocity-tools -g

now it works.

install latest version:

sudo c8y install latest

I'll try to deploy one of the samples now.

Marc
  • 11
  • 2
  • What version of node are you running? For example, I just tried it with 6.9.5 and 6.11.0, and it worked fine. – André Jun 08 '17 at 20:33
  • I am using Node v6.9.1, npm v3.10.8. I am trying to update to a newer version but I am struggeling with our proxy server at the moment. – Marc Jun 09 '17 at 05:18
  • So you got it working without? Sounds great. I forgot to tell that I tried on a Mac. It should not be necessary to use sudo with the c8y tool in general, because it only works in your current project directory. – André Jun 09 '17 at 09:25
  • Does the c8y CLI work at all on an Ubuntu OS? The npm error message is stating that you need Darwin as your OS. I also had similar error messages on my Ubuntu machine, tried several node and npm versions (with n) but none of them worked. Then switched to an iMac and that worked. – Jos Harink Jan 09 '18 at 08:41

0 Answers0