Liferay7 Theme -Gulp watch not working when gogo shell is on different port

thumbnail
Narsingh Pal, modified 7 Years ago. Junior Member Posts: 53 Join Date: 1/18/14 Recent Posts

In my portal-ext.properties file, the gogo shell is configured for port 11312 - [default is 11311].

module.framework.properties.osgi.console=localhost:11312

 

Due to this setting, the theme gulp "watch" task is not working, and I get below error on the command prompt from where I try to run the gulp task

"Cannot connect to gogo shell. Please ensure local Liferay instance is running."

I tried to dig a bit further and found that watch.js file has this connection setting hardcoded to use port 11311.

Below is my gulpfile.js

'use strict';

var gulp = require('gulp');
var liferayThemeTasks = require('liferay-theme-tasks');

liferayThemeTasks.registerTasks({
   gulp: gulp
});

 

Is there any way, by which I can configure my gogo shell port [e.g. in gulpfile.js] , so that gulp watch task works properly ?

 

Many thanks in advance!!

 

Regards

Narsingh Pal

 

thumbnail
Narsingh Pal, modified 7 Years ago. Junior Member Posts: 53 Join Date: 1/18/14 Recent Posts

Ok. Found the solution. Might be helpful for anyone facing similar issue.

 

Run the gulp watch with additional argument

"--port <gogoshell port number>" e.g. 

gulp watch --port 11312

 

Regards 

Narsingh Pal