Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command failed: .../node_modules/@esbuild/linux-loong64/bin/esbuild --version #3822

Closed
ZONEZH opened this issue Jul 2, 2024 · 9 comments
Closed

Comments

@ZONEZH
Copy link

ZONEZH commented Jul 2, 2024

I can download the esbuild dependency normally in both Windows and Mac environments, but it cannot be downloaded in the Linux LoongX64 architecture

  1. Computer configuration: Linux ZONEZH-PC 4.19.0 longson-3 desktop # 5114 SMP Wed May 11 17:37:42 CST 2022 loongarch64 GNU/Linux
  2. Encoding environment: Vue3+vite+tsx...
  3. report errors :
error /home/ZONEZH/code/webledvision/node_modules/esbuild: Command failed.
Exit code: 1
Command: node install.js
Arguments: 
Directory: /home/ZONEZH/code/webledvision/node_modules/esbuild
Output:
node:internal/errors:865
  const err = new Error(message);
              ^

Error: Command failed: /home/ZONEZH/.nvm/versions/node/v18.20.2/bin/node /home/ZONEZH/code/webledvision/node_modules/esbuild/bin/esbuild --version
node:child_process:929
    throw err;
    ^

Error: Command failed: /home/ZONEZH/code/webledvision/node_modules/@esbuild/linux-loong64/bin/esbuild --version
    at checkExecSyncError (node:child_process:890:11)
    at Object.execFileSync (node:child_process:926:15)
    at Object.<anonymous> (/home/ZONEZH/code/webledvision/node_modules/esbuild/bin/esbuild:220:28)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
    at node:internal/main/run_main_module:28:49 {
  status: null,
  signal: 'SIGSEGV',
  output: [ null, null, null ],
  pid: 7902,
  stdout: null,
  stderr: null
}

Node.js v18.20.2

    at checkExecSyncError (node:child_process:890:11)
    at Object.execFileSync (node:child_process:926:15)
    at validateBinaryVersion (/home/ZONEZH/code/webledvision/node_modules/esbuild/install.js:100:28)
    at /home/ZONEZH/code/webledvision/node_modules/esbuild/install.js:282:5 {
  status: 1,
  signal: null,
  output: [
    null,
    Buffer(0) [Uint8Array] [],
    Buffer(903) [Uint8Array] [
      110, 111, 100, 101,  58,  99, 104, 105, 108, 100,  95, 112,
      114, 111,  99, 101, 115, 115,  58,  57,  50,  57,  10,  32,
       32,  32,  32, 116, 104, 114, 111, 119,  32, 101, 114, 114,
       59,  10,  32,  32,  32,  32,  94,  10,  10,  69, 114, 114,
      111, 114,  58,  32,  67, 111, 109, 109,  97, 110, 100,  32,
      102,  97, 105, 108, 101, 100,  58,  32,  47, 104, 111, 109,
      101,  47,  90,  79,  78,  69,  90,  72,  47,  99, 111, 100,
      101,  47, 119, 101,  98, 108, 101, 100, 118, 105, 115, 105,
      111, 110,  47, 110,
      ... 803 more items
    ]
  ],
  pid: 7891,
  stdout: Buffer(0) [Uint8Array] [],
  stderr: Buffer(903) [Uint8Array] [
    110, 111, 100, 101,  58,  99, 104, 105, 108, 100,  95, 112,
    114, 111,  99, 101, 115, 115,  58,  57,  50,  57,  10,  32,
     32,  32,  32, 116, 104, 114, 111, 119,  32, 101, 114, 114,
     59,  10,  32,  32,  32,  32,  94,  10,  10,  69, 114, 114,
    111, 114,  58,  32,  67, 111, 109, 109,  97, 110, 100,  32,
    102,  97, 105, 108, 101, 100,  58,  32,  47, 104, 111, 109,
    101,  47,  90,  79,  78,  69,  90,  72,  47,  99, 111, 100,
    101,  47, 119, 101,  98, 108, 101, 100, 118, 105, 115, 105,
    111, 110,  47, 110,
    ... 803 more items
  ]
@evanw
Copy link
Owner

evanw commented Jul 2, 2024

Sorry but there's not much I can do about this. The loong64 version is provided as-is with the assumption that the output of the Go compiler with the settings GOOS=linux and GOARCH=loong64 works on all loong64 devices. Some thoughts:

  • Does esbuild no longer work at all on any loong64 device? Or is it only working on certain loong64 devices? If it just doesn't work at all, then I can remove it entirely and say that esbuild no longer supports loong64.

  • Does it work with version 0.21.0 but not version 0.22.0? Version 0.22.0 of esbuild upgraded the version of the Go compiler from Go 1.20 to Go 1.22. It's possible that something about that compiler upgrade broke compilation of Go code to loong64 devices. In that case you'd need to get the Go compiler itself fixed.

@ZONEZH
Copy link
Author

ZONEZH commented Jul 3, 2024

Sorry but there's not much I can do about this. The loong64 version is provided as-is with the assumption that the output of the Go compiler with the settings GOOS=linux and GOARCH=loong64 works on all loong64 devices. Some thoughts:

  • Does esbuild no longer work at all on any loong64 device? Or is it only working on certain loong64 devices? If it just doesn't work at all, then I can remove it entirely and say that esbuild no longer supports loong64.
  • Does it work with version 0.21.0 but not version 0.22.0? Version 0.22.0 of esbuild upgraded the version of the Go compiler from Go 1.20 to Go 1.22. It's possible that something about that compiler upgrade broke compilation of Go code to loong64 devices. In that case you'd need to get the Go compiler itself fixed.

I am glad to receive your reply. Regarding your question:

  1. I currently only have this one in hand, So I am not sure if other Long 64 devices can work properly.
  2. I have seen that the Long community has provided a version of the relevant esbuild
    https://registry.loongnix.cn:4873/#/detail/@esbuild/linux-loong64
    I forcibly changed the esbuild version to the specified version by setting the package's resolutions. I tried 0.21.0, 0.21.5, 0.22.0, and 0.23.0, but still reported the same error

@XiaodongLoong
Copy link

Sorry, I have left from Loongson.

@ZONEZH
Copy link
Author

ZONEZH commented Jul 19, 2024

Sorry, I have left from Loongson.

Okay, I really don't know what to do with this Loongson architecture. How can I find the corresponding technical support?

@abner-chenc
Copy link

Sorry, I have left from Loongson.

Okay, I really don't know what to do with this Loongson architecture. How can I find the corresponding technical support?

Sorry, I will try to solve this problem

@abner-chenc
Copy link

Sorry, I have left from Loongson.

Okay, I really don't know what to do with this Loongson architecture. How can I find the corresponding technical support?

This is my email: chenguoqi@loongson.cn You can contact me directly

@abner-chenc
Copy link

I have a Linux/long64 machine here, and everything is normal when I test the compilation and running of esbuild

2024-08-20_14-25

@abner-chenc
Copy link

@ZONEZH :
I think the problem here is probably caused by the firewall of the network. Most of the time, we access the network behind the firewall. You may need a proxy, and perhaps your problem will disappear.

@ZONEZH
Copy link
Author

ZONEZH commented Aug 22, 2024

@ZONEZH : I think the problem here is probably caused by the firewall of the network. Most of the time, we access the network behind the firewall. You may need a proxy, and perhaps your problem will disappear.

The problem has been solved!!!
Firstly, I would like to express my gratitude to the engineers at Loongson. With their assistance, several of my issues have been effectively resolved. The following "they" refer to the engineers at Loongson;

I would like to describe the root cause of the problem I have encountered;

Although I reported this esbuild error during npm installation in the original project, I was able to install a new project with the same architecture normally. After their advice and troubleshooting, I deleted package.lock.json/yarn.lockjson and encountered common electron installation errors. I then followed the documentation steps provided by the Loongson community and executed the corresponding command, but encountered the make: g++error again. Upon their prompt, I installed g++and the problem was resolved;

@ZONEZH ZONEZH closed this as completed Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants