Forum Discussion

RobertT's avatar
9 years ago

Lithium-Klout SDK Installation Problems

Hi all, 

 

Installing and setting up the Lithium-Klout SDK as part of a new workflow here for our community and we're running into a few issues. While the dependencies of Node.js (v6.2.1) and NPM (v3.9.3) are installed alongside successful installation of the Lithium-Klout SDK.

 

We run into problems starting with npm install -g lithium-sdk which appears to run correctly but the console output shows the following snippet

 

[execsync v1.0.2] Attempting to compile native extensions.
[execSync v1.0.2]

    Native code compile failed!!

> ws@0.4.32 install /Users/rth77/Git Repositories/node_modules/karma/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

 

Furthermore with everything set up running the li create-project command returns the following error:

 

module.js:442
    throw err;
    ^

Error: Cannot find module 'has-color'
    at Function.Module._resolveFilename (module.js:440:15)
    at Function.Module._load (module.js:388:25)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/lithium-sdk/node_modules/gulp-util/node_modules/chalk/index.js:4:16)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)

 

Does anyone have any ideas how we get around this?

 

Thanks

 

4 Replies

  • ChhamaJ's avatar
    ChhamaJ
    Khoros Staff
    9 years ago

    RobertT

     

    Can you give us some more details as in what Operating Systems you are using? Also a debug log, try running the following command and give us the output.

     

    li create-project --debug

    Regards,
    Chhama

  • DougS's avatar
    DougS
    Khoros Oracle
    9 years ago

    Also, can you run the following and paste in the output?:

     

    node -v
    npm -v
    npm ls -g lithium-sdk --depth=0

    Also note that the lithium SDK only works on the "LTS" version of node (4.X.X) and not on the "Latest Features" version (6.X.X) so you may need to downgrade if you are using a 6.X.X version (or you can use something like NVM to run the versions in parallel).

     

    -Doug

  • Hi All, 

     

    Running OS X 10.11.5, managed to sort the issue by removing and re-installing Node.js, something relating to permissions and System Integrity Protection affected the install, once re-installed the SDK installed fine and cleared the issues.

     

    Thanks again for your help.

  • bowenli's avatar
    bowenli
    Ace
    9 years ago
    I have a docker image for SDK, you can use it in any platform, Mac, windows, Linux etc.

    run command : docker pull bowen31337/lithium-sdk