Khoros Community

Highlighted
Respected Contributor
Respected Contributor

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

Jump to solution

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
module.js:471
    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)
mlaXXX:JMPLithiumSDK IanATJMP$ 

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. 

 

Thanks.

0 Kudos
3 Replies 3
Honored Contributor Honored Contributor
Honored Contributor

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

Jump to solution

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,

Christian

Reply
Loading...
Respected Contributor
Respected Contributor

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

Jump to solution

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 (https://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=sdk#l::%7B%22p%...)
  • 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.

0 Kudos
Reply
Loading...
Respected Contributor
Respected Contributor

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

Jump to solution
Thanks @cike.
0 Kudos
Reply
Loading...