Forum Discussion

peterlu's avatar
peterlu
Champion
9 years ago

Lithium-Klout SDK installation problem

Hi Lithium,

 

We are keen to use this SDK for our new projects. We have followed the below instructions in MAC OSX and Linux (Centos/Ubuntu), but no luck.

http://sdk-docs.lithium.com/develop/getStarted

 

On Mac, we have installed the SDK, and can create project by "li create-project". But when we try to "li export-studio-plugin", it throws exceptions.

We have also tried to installed SDK on Centos or Ubuntu, but the installation process cannot finish, it gets stuck.

 

Can we have some virtualbox linux image (.ova file) with installed and tested SDK that we can just download and use?

 

We also noticed that during the installation, there are a lot of warnings.

 

Peter

  • One of our team members installed the SDK, but when he tried to run it using the commands. He got this error

    has-color module is missing, something like that.

    Then he unintalled the SDK, and tried to reinstall it. The installation process did not even finish. It got stuck at [fsevents].

    • DougS's avatar
      DougS
      Khoros Oracle

      Hi Peter,

       

      Node can be a bit tricky sometimes when it comes to installing dependencies. This page about troubleshooting npm has always been very helpful for me to resolve these types of issues:

       

      https://github.com/npm/npm/wiki/Troubleshooting

       

      The most important sections (the ones I end up using the most to resolve npm issues) are "Try clearing the npm cache" and "Permission Error" (however, I don't advise npm install using sudo, which the "Permission Error" suggests as one possible fix).

       

      I think the issue you were seeing where it kept running the last "fsevents" may have been caused by an npm caching issue, and I'm hoping that running npm cache clean -f will get you past that.

       

      Please run / have your team member try running the following:

       

      sudo chown -R $USER $HOME/.npm
      sudo chown -R $USER /usr/local/lib/node_modules
      sudo chmod -R a+w /usr/bin
      npm cache clean -f npm install gulp -g npm install lithium-sdk -g

       

      If the install still fails, you can try one more thing:

       

      npm cache clean -f
      npm install lithium-sdk -g --force

       

      Finally, if the install is still failing, can you run the following and paste the entire output (you can skip some of the output of the npm install lithium-sdk -g --force command, but please include where it starts giving errors that it doesn't seem to recover from) in a reply to this thread?:

       

      node -v npm -v 
      npm ls -g lithium-sdk --depth=0
      npm cache clean -f
      npm install lithium-sdk -g --force

       

      I should hopefully be able to advise based on that output.

       

      Thanks for your patience on this. Node can be a bit frustrating at times, but once we get you past this hurdle then things should hopefully run a lot smoother for you.

       

      We are also looking into a VM-based solution which uses Virtualbox.

       

      -Doug

      • peterlu's avatar
        peterlu
        Champion
        Hi Doug,

        We re-installed it today, and it is working. No idea why.

        Thanks,
        Peter
  • OlivierS DougS the community is on 16.2

    Now I have tried to reinstalled lithium-sdk on mac OSX. The installation cannot finish and it seems to get stuck.

    Below is the print out.

    npm WARN deprecated gulp-clean@0.3.1: use gulp-rimraf instead
    npm WARN engine karma@0.12.37: wanted: {"node":">=0.8 <=0.12 || >=1 <=2"} (current: {"node":"4.4.1","npm":"2.14.20"})
    npm WARN deprecated npmconf@2.1.1: this package has been reintegrated into npm and is now out of date with respect to npm
    npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
    npm WARN peerDependencies The peer dependency continuation-local-storage@~3 included from cls-bluebird will no
    npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
    npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
    npm WARN engine coffee-script-redux@2.0.0-beta8: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.4.1","npm":"2.14.20"})
    npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
     
    > execSync@1.0.2 install /usr/local/lib/node_modules/lithium-sdk/node_modules/execSync
    > node install.js
    
    [execsync v1.0.2] Attempting to compile native extensions.
    [execSync v1.0.2]
        Native code compile failed!!
    npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
     
    > spawn-sync@1.0.15 postinstall /usr/local/lib/node_modules/lithium-sdk/node_modules/spawn-series/node_modules/cross-spawn/node_modules/spawn-sync
    > node postinstall
    
     
    > phantomjs@1.9.19 install /usr/local/lib/node_modules/lithium-sdk/node_modules/phantomjs
    > node install.js
    
    PhantomJS not found on PATH
    Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-macosx.zip
    Saving to /usr/local/lib/node_modules/lithium-sdk/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-macosx.zip
    Receiving...
    / [=======================================-] 98% 0.0s-
    Received 9187K total.
    Extracting zip contents
    Removing /usr/local/lib/node_modules/lithium-sdk/node_modules/phantomjs/lib/phantom
    Copying extracted folder /usr/local/lib/node_modules/lithium-sdk/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-macosx.zip-extract-1459055387371/phantomjs-1.9.8-macosx -> /usr/local/lib/node_modules/lithium-sdk/node_modules/phantomjs/lib/phantom
    Writing location.js file
    Done. Phantomjs binary available at /usr/local/lib/node_modules/lithium-sdk/node_modules/phantomjs/lib/phantom/bin/phantomjs
    npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
    npm WARN deprecated graceful-fs@2.0.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
    npm WARN engine hawk@0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"4.4.1","npm":"2.14.20"})
    npm WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"4.4.1","npm":"2.14.20"})
    npm WARN engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"4.4.1","npm":"2.14.20"})
    npm WARN engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"4.4.1","npm":"2.14.20"})
    npm WARN engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"4.4.1","npm":"2.14.20"})
     
    > spawn-sync@1.0.15 postinstall /usr/local/lib/node_modules/lithium-sdk/node_modules/gulp-sass/node_modules/node-sass/node_modules/cross-spawn/node_modules/spawn-sync
    > node postinstall
    
     
    > ws@0.4.32 install /usr/local/lib/node_modules/lithium-sdk/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
    > (node-gyp rebuild 2> builderror.log) || (exit 0)
    
      CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
     
    > fsevents@0.3.8 install /usr/local/lib/node_modules/lithium-sdk/node_modules/dgeni-packages/node_modules/nunjucks/node_modules/chokidar/node_modules/fsevents
    > node-gyp rebuild
    
      SOLINK_MODULE(target) Release/.node
      CXX(target) Release/obj.target/fse/fsevents.o
      SOLINK_MODULE(target) Release/fse.node
     
    > fsevents@1.0.9 install /usr/local/lib/node_modules/lithium-sdk/node_modules/karma/node_modules/chokidar/node_modules/fsevents
    > node-pre-gyp install --fallback-to-build
    
    [fsevents] Success: "/usr/local/lib/node_modules/lithium-sdk/node_modules/karma/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node" is installed via remote
     
    > fsevents@1.0.9 install /usr/local/lib/node_modules/lithium-sdk/node_modules/gulp-watch/node_modules/chokidar/node_modules/fsevents
    > node-pre-gyp install --fallback-to-build
    
    [fsevents] Success: "/usr/local/lib/node_modules/lithium-sdk/node_modules/gulp-watch/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node" is installed via remote

    it just kept running on the last "fsevents".

  • OlivierS's avatar
    OlivierS
    Lithium Alumni (Retired)

    peterlu we don't have any VirtualBox image to share, unfortunately. Could you please post the errors you got during the installation as well as the exceptions when using the li export-studio-plugin command?

    • DougS's avatar
      DougS
      Khoros Oracle

      We released a new version of the SDK last week that requires you to be on version 16.2 or higher of Community. I thought we had it checking the version of your community and telling you how to downgrade, but b/c of some API formatting changes you will get a cryptic error message when you try to run any commands using version 1.0.3 of the SDK if your community is not on version 16.2 or above. The message will look something like this:

       

      [09:33:14] Invalid response from server. Check your server url and version.
      /Users/doug.schroeder/lia/lithium-sdk/lib/version-check.js:78
                  throw error;
                  ^
      
      Error: Invalid response from server. Check your server url and version.
          at Request._callback (/Users/doug.schroeder/lia/lithium-sdk/lib/version-check.js:58:17)
          at Request.self.callback (/Users/doug.schroeder/lia/lithium-sdk/node_modules/request/request.js:199:22)
          at emitTwo (events.js:87:13)
          at Request.emit (events.js:172:7)
          at Request.<anonymous> (/Users/doug.schroeder/lia/lithium-sdk/node_modules/request/request.js:1160:14)
          at emitOne (events.js:82:20)
          at Request.emit (events.js:169:7)
          at IncomingMessage.<anonymous> (/Users/doug.schroeder/lia/lithium-sdk/node_modules/request/request.js:1111:12)
          at emitNone (events.js:72:20)
          at IncomingMessage.emit (events.js:166:7)

       

      If your community is not on 16.2, then you need to install an older version of the SDK. Run the following command to install version 1.0.2:

       

      npm install -g lithium-sdk@1.0.2

      -Doug