Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Liferay7 Theme -Gulp watch not working when gogo shell is on different port
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
Attachments:
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