[Solved] Jenkins build error: esbuild install failed

When building the front-end package of the company’s test environment, an error was suddenly reported and the construction failed. After checking the log, an error was reported and the esbuild installation failed. I have not installed this esbuild on Jenkins server, and the code proposed by the development is no problem.
solution:
first look for the esbuild directory in the front-end package. I found that there are two esbuild directories in my front-end package, and then I went in and found that there are install JS file, NPM – V check your own NPM version. If it is greater than 7, execute
node node_modules/esbuild/install.js
after manual installation, build from Jenkins again, and there will be no error

Read More: