Author Topic: gulp failed with error in plugin "gulp-xgettext"  (Read 23901 times)

0 Members and 2 Guests are viewing this topic.

scott_ease

  • Jr. Member
  • **
  • Posts: 4
gulp failed with error in plugin "gulp-xgettext"
« on: October 28, 2021, 12:21:24 AM »
Greetings-

I'm trying to customize Mibew Messenger 3.5.1 and keep getting following message:

C:\Users\Administrator\Desktop\mibew\src>gulp
[16:58:46] Using gulpfile ~\Desktop\mibew\src\gulpfile.js
[16:58:46] Starting 'default'...
[16:58:46] Starting 'clean'...
[16:58:46] Finished 'clean' after 11 ms
[16:58:46] Starting 'js'...
[16:58:46] Starting 'chat-styles'...
[16:58:46] Starting 'page-styles'...
[16:58:46] Starting 'generate-tmp-po'...
[16:58:46] Starting 'chat-styles-handlebars'...
[16:58:46] Starting 'generate-pot'...
[16:58:47] 'generate-pot' errored after 239 ms
[16:58:47] Error in plugin "gulp-xgettext"
Message:
    Command failed: xgettext --force-po -o - --language="JavaScript" --keyword="trans" -
'xgettext' is not recognized as an internal or external command,
operable program or batch file.

Details:
    killed: false
    code: 1
    signal: null
    cmd: xgettext --force-po -o - --language="JavaScript" --keyword="trans" -
    domainEmitter: [object Object]
    domain: [object Object]
    domainThrown: false

[16:58:47] 'generate-tmp-po' errored after 255 ms
[16:58:47] 'default' errored after 273 ms


I tried node-v10.20.1 & node-v11.15.0 & node-v16.13.0 but none worked out. I also tried "npm install xgettext-js" command and double checked that "\src\node_modules\xgettext-js\xgettext.js" exist, and then gulp again.

Could you please help?
Thank you.

faf

  • Mibew Staff Member
  • Native
  • *****
  • Posts: 951
    • Mibew Messenger
Re: gulp failed with error in plugin "gulp-xgettext"
« Reply #1 on: October 28, 2021, 10:56:37 PM »
xgettext is a part of GNU gettext tools. The exact way to install it depends on the OS being used. Most probably you're using Windows. As it's written on the official site, there are pre-compliled binaries for Windows.

scott_ease

  • Jr. Member
  • **
  • Posts: 4
Re: gulp failed with error in plugin "gulp-xgettext"
« Reply #2 on: October 31, 2021, 05:29:41 AM »
It went through a couple of times but got stuck again. This time the error message is as follows:

C:\Users\Administrator\Desktop\mibew\src>gulp
[22:11:39] Using gulpfile ~\Desktop\mibew\src\gulpfile.js
[22:11:39] Starting 'default'...
[22:11:39] Starting 'clean'...
[22:11:39] Finished 'clean' after 33 ms
[22:11:39] Starting 'js'...
[22:11:39] Starting 'chat-styles'...
[22:11:39] Starting 'page-styles'...
[22:11:39] Starting 'generate-tmp-po'...
[22:11:39] Starting 'chat-styles-handlebars'...
[22:11:39] Starting 'generate-pot'...
[22:11:41] Finished 'page-styles' after 2.16 s
[22:11:43] Finished 'chat-styles-handlebars' after 3.71 s
[22:11:43] Starting 'chat-styles-js'...
[22:11:43] Finished 'chat-styles-js' after 65 ms
[22:11:43] Finished 'chat-styles' after 3.82 s
[22:11:44] Finished 'js' after 5.34 s
[22:11:49] Finished 'generate-pot' after 9.92 s
[22:11:49] Starting '<anonymous>'...
[22:11:49] Finished '<anonymous>' after 367 ms
[22:11:49] Finished 'generate-tmp-po' after 10 s
[22:11:49] Starting 'pack-sources'...
[22:11:49] Starting 'composer-install'...
[22:11:49] Starting 'get-composer'...
[22:11:55] Finished 'get-composer' after 5.72 s
[22:11:55] Starting '<anonymous>'...
[22:12:10] Finished '<anonymous>' after 15 s
[22:12:10] Finished 'composer-install' after 21 s
[22:12:10] Starting 'bower-install'...
[22:12:18] 'bower-install' errored after 7.5 s
[22:12:18] Error: File not found with singular glob: C:/Users/Administrator/Desk
top/mibew/src/mibew/js/vendor/backbone/backbone.js (if this was purposeful, use
`allowEmpty` option)
    at Glob.<anonymous> (C:\Users\Administrator\Desktop\mibew\src\node_modules\g
lob-stream\readable.js:84:17)
    at Object.onceWrapper (events.js:422:26)
    at Glob.emit (events.js:315:20)
    at Glob.EventEmitter.emit (domain.js:485:12)
    at Glob._finish (C:\Users\Administrator\Desktop\mibew\src\node_modules\glob-
stream\node_modules\glob\glob.js:194:8)
    at done (C:\Users\Administrator\Desktop\mibew\src\node_modules\glob-stream\n
ode_modules\glob\glob.js:179:14)
    at Glob._processSimple2 (C:\Users\Administrator\Desktop\mibew\src\node_modul
es\glob-stream\node_modules\glob\glob.js:685:12)
    at C:\Users\Administrator\Desktop\mibew\src\node_modules\glob-stream\node_mo
dules\glob\glob.js:673:10
    at Glob._stat2 (C:\Users\Administrator\Desktop\mibew\src\node_modules\glob-s
tream\node_modules\glob\glob.js:769:12)
    at lstatcb_ (C:\Users\Administrator\Desktop\mibew\src\node_modules\glob-stre
am\node_modules\glob\glob.js:761:12)
[22:12:18] 'pack-sources' errored after 28 s
[22:12:18] 'default' errored after 39 s


This time it's bower-install error, sometimes it's composer-install error. I tried reinstall Nodejs & Git & GNU gettext, I also tried command "npm cache clean" & "npm install" & "npm audit fix" but couldn't proceed.

Any advice? Thank you.

faf

  • Mibew Staff Member
  • Native
  • *****
  • Posts: 951
    • Mibew Messenger
Re: gulp failed with error in plugin "gulp-xgettext"
« Reply #3 on: November 01, 2021, 06:36:14 PM »
Frankly the only reasonable advice personally I can give is to not use Windows as a building environment. I've just checked the building process using VM with the actual LTS version of Ubuntu onboard. All went nice. As well as on our domestic test system with a completely different GNU/Linux distro. Probably (and even highly likely) there are some best practices on how to properly configure Windows-based node.js environment, but I'm unaware of them.

scott_ease

  • Jr. Member
  • **
  • Posts: 4
Re: gulp failed with error in plugin "gulp-xgettext"
« Reply #4 on: November 03, 2021, 12:52:29 AM »
Honestly speaking, the program is not convenient. Currently user can only edit CSS files without rebuilding system. Could you guys make some change to let user freely edit all files under "styles" directory? In that way, Mibew Messenger will become much more popular.
Thank you.

faf

  • Mibew Staff Member
  • Native
  • *****
  • Posts: 951
    • Mibew Messenger
Re: gulp failed with error in plugin "gulp-xgettext"
« Reply #5 on: November 03, 2021, 01:26:46 PM »
Honestly speaking, the program is not convenient. Currently user can only edit CSS files without rebuilding system. Could you guys make some change to let user freely edit all files under "styles" directory?

So, anyone could easily break the markup (or even add some nice XSS vulnerabilities), and then ask lame questions like "how to add a custom field?" and make stupid statements like "nothing works, this software sucks". Not to mention the negative effect on speed and performance. We've been through that with Mibew Messenger 1.x. The answer is no, thanks.

And, btw, there is a huge difference between typical end users and people who want to deeply customize the software. Mibew Messenger is convenient for the first ones. As of last ones, consider existing specifics as an entry threshold test.

In that way, Mibew Messenger will become much more popular.

What makes you think so? Not to mention the fact that we don't care too much about popularity.