Forum Discussion

ebonifacio's avatar
3 years ago

SDK - Gulp errors

Hello!

I'm trying to install and setting up Community SDK plugin at my machine. After some issues related to the node version used by the plugin, I was able to export the Studio plugin. 

I can see all the folder structure and files, but when I run gulp, I have this error message:

 

[14:04:07] 'plugin-build' errored after 314 ms
[14:04:07] TypeError in plugin 'run-sequence(watch-text)'
Message:
    Cannot read property 'map' of undefined
Stack:
TypeError: Cannot read property 'map' of undefined
 at Gulp.<anonymous> (/Users/xxx/community/community-project/node_modules/lithium-sdk/gulp/watch.js:111:55)

 

 

Does anybody have a solution for this?

Can be  dependencies that are no longer compatible with the way that gulpfile have been written? 

10 Replies

  • IanKl's avatar
    IanKl
    Khoros Alumni (Retired)
    3 years ago

    What are you running Gulp to do? Not part of SDK usage, right?

    It may be that you need to install Node Version Manager, which allows you to change your Node version depending on what apps you're using

  • ebonifacio's avatar
    ebonifacio
    Mentor
    3 years ago

    Hello!!

    SuzieH  I already have NVM, I'm using node 8.12 , and actually I'm not running any other project here. I'm just trying to set up Community Plugin SDK.

    IanKl  I'll  build a new skin. I need gulp to watch the CSS (SCSS) modifications.  And when I exported the project, there's already a gulpfile.js.  If you have a better solution, I'd be glad to test. 

  • IanKl's avatar
    IanKl
    Khoros Alumni (Retired)
    3 years ago
    • What platform are you on, Windows or Mac?
    • The SDK documentation recommends Node.js 8.3.0
    • You should not be running Gulp directly. You should be using the Lithium-SDK commands, i.e., li package-plugin and li submit-plugin -- is that what you're doing when you get this error?
    • Have you checked your server.conf.json file to make sure the settings are correct?
      • Make sure that the setting is "strictMode": false

    I'll keep an eye out on this thread until we resolve this for you. I know that setting up the SDK can be really frustrating; I'm here to help.

  • ebonifacio's avatar
    ebonifacio
    Mentor
    3 years ago

    Hello IanKl 

    Thanks for your help! It worked! 

    But I have some other questions now. I ran li set-responsive-options  and then li serve-sass. On my localhost I see html folder and the folders inside it (there's only assets and icons). Is it possible to visualise on my browser the pages/quilts/components? Or Do I have to create inside HTML folder , my HTML pages?

    Regards,

  • IanKl's avatar
    IanKl
    Khoros Alumni (Retired)
    3 years ago

    Hi, glad to hear that it worked!

    Please help others by choosing that post as the Solution.

    If I understand you correctly, you want to see your local filesystem for the SDK files in your browser? If so, I'm not sure off the top of my head of a way to do that other than maybe using FTP in the browser but that won't allow you to actually move the files. 

    You should download all the file structure and files from your Community by using li export-studio-plugin, which will download all files that have been modified. 

    Any folders or files you don't yet have, you can recreate manually, and if you want to modify a file, you can either modify it in Studio and then download it with li export-studio-plugin, or copy the XML into a new file that is named correctly. (Find it in Studio by clicking on Page, selecting the section, then the page (quilt) you want to edit or copy. See images.

    You should download/create at least these folders:

    ++ stage

    ++++ res

    ++++++ components

    ++++++ lang

    ++++++ layouts

    ++++++ skins

     

    ++++ web

    ++++++ html

    ++++++++ assets

  • ebonifacio's avatar
    ebonifacio
    Mentor
    3 years ago

     Hi IanKl 

    Let me try to explain better. 

    I'm a frontend developer and I would like to run the project on my localhost where I could see any change on my css before submit to stage. For example: I have a component with a form and I would like to change the text color and size. How can I see my changes locally ?   

    I already have all the folder and files structure(see attachment) and all I see on my localhost (browser) is folder structure (see attachment).

    Thanks!

  • IanKl's avatar
    IanKl
    Khoros Alumni (Retired)
    3 years ago

    The best I can offer you is to have your local css used as the page's css, which may be a little faster than the li package-plugin  /  li submit-plugin process.

    If you go to

    yoursite/t5/bizapps/page/tab/community%3Astudio%3Aadvanced%3Alar

    Studio > Advanced > SDK

    You'll see this page. You can check the Override Skin CSS URL, and select the skin you're currently using as the live skin should allow you to make local changes and have them reflected. Full disclosure: I've never done this as a customer, only as an Khoros engineer with higher access. So give this a try but no guarantees from me. Maybe SuzieH has some more information?

    Regardless, if I understand what you're asking, which is "Can I set up a local instance of the Community on my computer and make test changes before uploading?" the answer is no. 

    Refreshing with the local css file as above is the closest solution.

  • ebonifacio's avatar
    ebonifacio
    Mentor
    3 years ago

    Thanks IanKl 

    Although I wasn't expecting it to not be possible to make changes locally and test them before submit to Stage, I will try to work in the way you suggested, as I already consider it a good step forward.