apache / apisix-dashboard

Dashboard for Apache APISIX
https://apisix.apache.org/
Apache License 2.0
1k stars 523 forks source link

Build v2.4 error. #1503

Closed wannianma closed 3 years ago

wannianma commented 3 years ago

Bug report

Build v2.4 error.

Describe the bug

Build v2.4, get Some js build error, same error when use docker build dashboard.

Expected behavior

expect dashboard build success.

Screenshots

+ cp -r /tmp/dag-to-lua-1.1/lib/cli.lua /tmp/dag-to-lua-1.1/lib/dag-to-lua.lua /tmp/dag-to-lua-1.1/lib/json.lua ./output/dag-to-lua
+ cd ./api
+ go build -o ../output/manager-api -ldflags '-X github.com/apisix/manager-api/internal/utils.version=2.4 -X github.com/apisix/manager-api/internal/utils.gitHash=148b4ea' ./cmd/manager
+ cd ..
+ cp ./api/conf/schema.json ./output/conf/schema.json
+ cp ./api/conf/conf.yaml ./output/conf/conf.yaml
+ echo 'Build the Manager API successfully'
Build the Manager API successfully
yarn install v1.22.10
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.3.1: The platform "linux" is incompatible with this module.
info "fsevents@2.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "@mrblenny/react-flow-chart > react-zoom-pan-pinch@1.6.1" has unmet peer dependency "prop-types@^15.5.4".
warning " > @rjsf/antd@2.2.0" has unmet peer dependency "@babel/runtime-corejs2@^7.10.3".
warning " > @rjsf/antd@2.2.0" has unmet peer dependency "antd-dayjs-webpack-plugin@1.0.0".
warning " > @rjsf/antd@2.2.0" has unmet peer dependency "core-js@^2.5.7".
warning " > @uiw/react-codemirror@3.0.5" has unmet peer dependency "@babel/runtime@>=7.11.0".
warning " > @uiw/react-codemirror@3.0.5" has unmet peer dependency "codemirror@>=5.49.2".
warning " > styled-components@5.2.1" has unmet peer dependency "react-is@>= 16.8.0".
warning "umi > @umijs/preset-built-in > @pmmmwh/react-refresh-webpack-plugin@0.4.3" has unmet peer dependency "webpack@>=4.43.0 <6.0.0".
warning "@umijs/plugin-esbuild > esbuild-loader@2.6.3" has unmet peer dependency "webpack@^4.40.0 || ^5.0.0".
warning "@umijs/preset-react > @umijs/plugin-dva > babel-plugin-dva-hmr@0.4.2" has unmet peer dependency "redbox-react@1.x".
warning "@umijs/preset-react > @umijs/plugin-dva > dva-loading@3.0.22" has unmet peer dependency "dva-core@^1.1.0 | ^1.5.0-0 | ^1.6.0-0".
warning "@umijs/preset-react > @umijs/plugin-dva > dva > connected-react-router@6.5.2" has unmet peer dependency "react-router@^4.3.1 || ^5.0.0".
[5/5] Building fresh packages...
$ umi g tmp
Done in 50.49s.
yarn run v1.22.10
$ umi build

● Webpack █████████████████████████ chunk asset optimization (92%)  
 TerserPlugin

events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at ChildProcess.target._send (internal/child_process.js:762:20)
    at ChildProcess.target.send (internal/child_process.js:634:19)
    at ChildProcessWorker.send (/usr/local/apisix-dashboard/web/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/workers/ChildProcessWorker.js:299:17)
    at WorkerPool.send (/usr/local/apisix-dashboard/web/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/WorkerPool.js:32:34)
    at Farm._process (/usr/local/apisix-dashboard/web/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/Farm.js:147:10)
    at Farm._enqueue (/usr/local/apisix-dashboard/web/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/Farm.js:176:10)
    at Farm._push (/usr/local/apisix-dashboard/web/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/Farm.js:183:12)
    at Promise (/usr/local/apisix-dashboard/web/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/Farm.js:106:14)
    at new Promise (<anonymous>)
    at Farm.doWork (/usr/local/apisix-dashboard/web/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/Farm.js:69:21)
    at JestWorker._callFunctionWithArgs (/usr/local/apisix-dashboard/web/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/index.js:182:23)
    at scheduledTasks.push.limit (/usr/local/apisix-dashboard/web/node_modules/terser-webpack-plugin/dist/index.js:304:45)
Emitted 'error' event at:
    at process.nextTick (internal/child_process.js:766:39)
    at process._tickCallback (internal/process/next_tick.js:61:11)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

System information

Additional context

Add any other context about the problem here.

juzhiyuan commented 3 years ago

cc @guoqqqi to check this issue today.

LiteSun commented 3 years ago

ping @guoqqqi

guoqqqi commented 3 years ago

I will buy a server to try to reproduce the problem.

LiteSun commented 3 years ago

@guoqqqi any update about this issue?😄

guoqqqi commented 3 years ago

Hi, @wannianma, I followed the build guide https://apisix.apache.org/docs/dashboard/deploy/ and it built successfully on the server, can you give more details on what you did. Did you try deleting the local cache and retrying to see if it succeeded, or is it possible that a lack of memory is causing this? If they don't work, then let's explore them together. Thanks. image

juzhiyuan commented 3 years ago

Write EPIPE means that writing of (presumably) the HTTP request failed because the other end closed the connection. Please have a try :) I will close this issue, if you still have this issue, kindly let us know.

wannianma commented 3 years ago

It's so weird,i have build success using my home computer,but always get same build error using online test server. I have tried clear npm cache, but it 's not work. I think the building error maybe cause by network when download some npm dependent packages,but i have no idea about how to solve this. My current solution is copy the builded package at home to the online test server . Can we @juzhiyuan provide the builded release for user download, not all backend developer care about the js and ts code detail.

===============

Sorry, i do not check you guys have provide rpm package, i will use the rpm package replace my own builded package. Thanks.

juzhiyuan commented 3 years ago

😄