shellwax icon indicating copy to clipboard operation
shellwax copied to clipboard

Errors when initializing bash language server

Open gogenan opened this issue 1 year ago • 18 comments

The following is always displayed in the Progress window:

image

The following errors are constantly reported on the standard output:

node:internal/modules/cjs/loader:1148 throw err; ^

Error: Cannot find module '/auto/ns_nm/users/gennady/.local/share/shellwax/5.3.3/node_modules/.bin/bash-language-server' at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15) at Module._load (node:internal/modules/cjs/loader:986:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12) at node:internal/main/run_main_module:28:49 { code: 'MODULE_NOT_FOUND', requireStack: [] }

Node.js v20.13.1

OS:

165 ilpt-muse05 ~/Documents/workspace-spring-tool-suite-4-4.24.0.RELEASE$ cat /etc/os-release NAME="Oracle Linux Server" VERSION="8.7" ID="ol" ID_LIKE="fedora" VARIANT="Server" VARIANT_ID="server" VERSION_ID="8.7" PLATFORM_ID="platform:el8" PRETTY_NAME="Oracle Linux Server 8.7" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:oracle:linux:8:7:server" HOME_URL="https://linux.oracle.com/" BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8" ORACLE_BUGZILLA_PRODUCT_VERSION=8.7 ORACLE_SUPPORT_PRODUCT="Oracle Linux" ORACLE_SUPPORT_PRODUCT_VERSION=8.7

Eclipse version:

Spring Tool Suite 4

Version: 4.24.0.RELEASE Build Id: 202407191504 Revision: bc5006ff14677eeda6540eaa02cafbf59de00c49

ShellWax version:

ShellWax 1.3.0.20240529-1946 org.eclipse.shellwax.feature.feature.group

gogenan avatar Sep 24 '24 12:09 gogenan

Do you have still running node/npm process?

akurtakov avatar Sep 24 '24 13:09 akurtakov

No, there is no such process.

gogenan avatar Sep 24 '24 13:09 gogenan

Do you have ~/.local/share/shellwax/5.3.3/node_modules/.bin/bash-language-server? If yes can you execute it ?

akurtakov avatar Sep 24 '24 13:09 akurtakov

No, as in one of the previous cases directory ~/.local/share/shellwax/5.3.3/node_modules/ is empty.

gogenan avatar Sep 24 '24 13:09 gogenan

What previous cases do you speak about? Isn't there some dialog with message?

akurtakov avatar Sep 24 '24 13:09 akurtakov

I meant case reported here, #89. I also tried to remove the directory without any success.

gogenan avatar Sep 24 '24 13:09 gogenan

Do I need external installation of nodejs and bash_language_server?

gogenan avatar Sep 24 '24 13:09 gogenan

No, nodejs bundle is a dependency of shellwax and should install bashls itself.

akurtakov avatar Sep 24 '24 13:09 akurtakov

Do you think you can import the code in Eclipse yourself and put a breakpoint on the first line of BashLanguageServer.installLS to see what/where goes wrong?

akurtakov avatar Sep 24 '24 13:09 akurtakov

I'm not sure. Eclipse is installed in a shared location and I don't know how many people use it. Anyway, I can try if you describe me the procedure. Don't you have any debug printouts?

gogenan avatar Sep 24 '24 13:09 gogenan

Unfortunately no but being in shared location is most likely the reason. I have never tested in such environment.

akurtakov avatar Sep 24 '24 13:09 akurtakov

In an enterprise tools are mostly in shared locations. Also, why should this matter? I have my own home directory.

gogenan avatar Sep 24 '24 14:09 gogenan

Is shellwax installed in the shared location?

akurtakov avatar Sep 24 '24 14:09 akurtakov

Would you please try with latest snapshot? I have made sure that it requires latest nodejs(+ number of other updates) to make sure that some old version is not used.

akurtakov avatar Sep 24 '24 14:09 akurtakov

Ok, next week probably

gogenan avatar Sep 24 '24 14:09 gogenan

I've tried something else. I looked at the code in GitHub and figured out the npm command line, then I run it and the server was successfully installed:

555 ilpt-muse05 ~/.local/share/shellwax/5.3.3$ npm install --prefix=. @.*** npm WARN saveError ENOENT: no such file or directory, open '/auto/ns_nm/users/gennady/.local/share/shellwax/5.3.3/package.json' npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN notsup Unsupported engine for @.: wanted: {"node":">=16"} (current: {"node":"10.24.0","npm":"6.14.11"}) npm WARN notsup Not compatible with your version of node/npm: @. npm WARN notsup Unsupported engine for @.: wanted: {"node":">=14.0.0"} (current: {"node":"10.24.0","npm":"6.14.11"}) npm WARN notsup Not compatible with your version of node/npm: @. npm WARN enoent ENOENT: no such file or directory, open '/auto/ns_nm/users/gennady/.local/share/shellwax/5.3.3/package.json' npm WARN 5.3.3 No description npm WARN 5.3.3 No repository field. npm WARN 5.3.3 No README data npm WARN 5.3.3 No license field.

  • @.*** added 33 packages from 36 contributors and audited 33 packages in 2.775s

4 packages are looking for funding run npm fund for details

found 0 vulnerabilities

After that I restarted Eclipse and now that the plugin works fine.

On Tue, Sep 24, 2024 at 5:12 PM Александър Куртаков < @.***> wrote:

Would you please try with latest snapshot? I have made sure that it requires latest nodejs(+ number of other updates) to make sure that some old version is not used.

— Reply to this email directly, view it on GitHub https://github.com/eclipse/shellwax/issues/122#issuecomment-2371422466, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHYQRKU2XSR3QNPUMPV6ZNTZYFXM5AVCNFSM6AAAAABOYGQGFSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZRGQZDENBWGY . You are receiving this because you authored the thread.Message ID: @.***>

-- Гена

gogenan avatar Sep 25 '24 07:09 gogenan

Would you please share the npm command ? I'm interested in whether it's the one from nodejs plugin in Eclipse or a system one.

akurtakov avatar Sep 25 '24 07:09 akurtakov

It is in my reply and it is the system one, of course: npm install --prefix=. @.***

On Wed, Sep 25, 2024 at 10:18 AM Александър Куртаков < @.***> wrote:

Would you please share the npm command ? I'm interested in whether it's the one from nodejs plugin in Eclipse or a system one.

— Reply to this email directly, view it on GitHub https://github.com/eclipse/shellwax/issues/122#issuecomment-2373250606, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHYQRKSTIF3CUQIOMD63JDTZYJPS3AVCNFSM6AAAAABOYGQGFSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZTGI2TANRQGY . You are receiving this because you authored the thread.Message ID: @.***>

-- Гена

gogenan avatar Sep 25 '24 07:09 gogenan

I'm closing this one as it works for the reporter.

akurtakov avatar Feb 14 '25 10:02 akurtakov