getgauge / gauge-js

JavaScript language plugin for Gauge
MIT License
81 stars 39 forks source link

Gauge Update js failed #665

Closed gokultw closed 2 months ago

gokultw commented 2 months ago

Describe the bug Unable to update the gauge JS to latest version

To Reproduce Steps (or project) to reproduce the behavior: run command gauge update js

Logs

.......................
Failed to update plugin 'js'.
Reason: exit status 1

Expected behavior plugin should be updated to latest version

Gauge version: 1.6.7
Plugins
-------
html-report (4.3.1)
java (0.11.0)
js (2.4.0)
screenshot (0.1.0)
spectacle (0.2.0)
xml-report (0.2.3)
chadlwilson commented 2 months ago

Hiya @gokultw - can you share what is in ~/.gauge/logs/gauge.log?

It might be something like a nodejs version problem or something like that (requires Node 16+ for v4 onwards)

zabil commented 2 months ago

This might also be a network issue. Checked this right now and it works. But yes like @chadlwilson mentioned please get the logs. For example

⋊> gauge update js --log-level=debug                                     12:55:09
Gathering metadata for js
Downloading https://downloads.gauge.org/plugin/js?l=&p=dotnet,html-report,java,screenshot,ts&o=darwin&a=arm64
Downloading https://github.com/getgauge/gauge-js/releases/download/v4.0.1/gauge-js-4.0.1.zip
.......................
Running plugin hook command => [npm install --omit=dev --silent]
Installing plugin js 4.0.1
Successfully updated plugin 'js'.
gokultw commented 2 months ago

Below is the log for JS

20-06-2024 17:29:51.395 [Gauge] [DEBUG] Gathering metadata for js
20-06-2024 17:29:51.397 [Gauge] [DEBUG] Downloading https://downloads.gauge.org/plugin/js?l=&p=html-report,js,screenshot,spectacle&o=darwin&a=arm64
20-06-2024 17:29:51.841 [Gauge] [DEBUG] Downloading https://github.com/getgauge/gauge-js/releases/download/v4.0.1/gauge-js-4.0.1.zip
20-06-2024 17:29:53.856 [Gauge] [DEBUG] Running plugin hook command => [npm install --omit=dev --silent]
20-06-2024 17:30:00.782 [Gauge] [ERROR] Failed to install plugin 'js' version 4.0.1.
Reason: exit status 1

I'm able to successfully install the Html plugin & others. the issue is only with js.

zabil commented 2 months ago

It might be something like a nodejs version problem or something like that (requires Node 16+ for v4 onwards)

Can you please share this information?

gokultw commented 2 months ago

I have node 14 on my machine, previously gauge js 2.4.0 was installed, tried upgrading it failed. So uninstalled it. now I'm unable to install 2.4.0 as well.

gokultw commented 2 months ago

The issue is resolved after upgrading my node to 22.3.

Thanks @chadlwilson @zabil