Errors when initializing bash language server
The following is always displayed in the Progress window:
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
Do you have still running node/npm process?
No, there is no such process.
Do you have ~/.local/share/shellwax/5.3.3/node_modules/.bin/bash-language-server? If yes can you execute it ?
No, as in one of the previous cases directory ~/.local/share/shellwax/5.3.3/node_modules/ is empty.
What previous cases do you speak about? Isn't there some dialog with message?
I meant case reported here, #89. I also tried to remove the directory without any success.
Do I need external installation of nodejs and bash_language_server?
No, nodejs bundle is a dependency of shellwax and should install bashls itself.
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?
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?
Unfortunately no but being in shared location is most likely the reason. I have never tested in such environment.
In an enterprise tools are mostly in shared locations. Also, why should this matter? I have my own home directory.
Is shellwax installed in the shared location?
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.
Ok, next week probably
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: @.***>
-- Гена
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.
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: @.***>
-- Гена
I'm closing this one as it works for the reporter.