Esteemed Contributor

SDK li export-studio-plugin fails (first time used)

Managed to install the SDK but cannot retrieve the plugin at studio:

li export-studio-plugin

I get the following errors:


MPLithiumSDK IanATJMP$ li export-studio-plugin
    throw err;

Error: Cannot find module 'has-color'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497: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:570:32)
    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)

Not sure where to look for an answer to that one. How do I resolve this? There's nothing in troubleshooting section.


In fact, even just using the li command to get help gives me the same errors. 



3 Replies 3
Honored Contributor

Hi @IanAtJMP,


I faced the same error message some days ago when I tried different Lithium-SDK commands.

I solved the issue by changing the permissions of some folders in my OS (MacOS El Captain). See the troubleshooting section here. After changing the permissions I re-run the npm install commands for gulp and the lithium-sdk and everything works as expected.


Maybe this will also helps you to get your SDK working.


Best regards,


Esteemed Contributor

Looks like there were a few issues:


  1. I had accidentally installed node.js 6.x.x, and as of the time of this post, the SDK only works with node.js 4.x.x.
  2. After removing 6.x.x and installing 4.x.x, I had other issues. I had to change permissions within the /bin/ folder where things were failing, because I couldn't actually change permissions for the /bin/ folder itself.  See: Troubleshooting permission errors in Non-Windows environments, at the bottom of Get Started (
  • cd /usr/local/lib/
  • sudo chown -R $USER node_modules
    • Give yourself write access to /bin:
  • sudo chmod -R a+w /usr/bin 

Couldn't give myself access to that last one, so I chmod subfolders of this as needed to get around the access errors.

Esteemed Contributor

Thanks @cike.

Welcome to the Technology board!

Curious about our platform? Looking to connect on social technology? You've come to the right place!

Are you a Khoros customer? For direct assistance from our Support team, please visit the Support Forum.