yinxin630 / fiora

An interesting open source chat application. Developed with node.js, mongoDB, socket.io and react
https://fiora.suisuijiang.com
MIT License
6.68k stars 1.33k forks source link

yarn build:web 报错 #547

Open amakerlife opened 1 year ago

amakerlife commented 1 year ago

console log:

yarn run v1.22.19
$ npx lerna run build:web --stream
lerna notice cli v4.0.0
lerna info versioning independent
lerna info Executing command in 1 package: "yarn run build:web"
@fiora/web: warning package.json: "dependencies" has dependency "@testing-library/jest-dom" with range "^5.14.1" that collides with a dependency in "devDependencies" of the same name with version "^4.2.4"
@fiora/web: $ rm -rf dist && cross-env NODE_ENV=production DOTENV_CONFIG_PATH=../../.env webpack --config build/webpack.prod.js && cp -r -f dist/fiora/* ../server/public
@fiora/web: ℹ Compiling Webpack
@fiora/web: Browserslist: caniuse-lite is outdated. Please run:
@fiora/web: npx browserslist@latest --update-db
@fiora/web: Why you should do it regularly:
@fiora/web: https://github.com/browserslist/browserslist#browsers-data-updating
@fiora/web: <--- Last few GCs --->
@fiora/web: [7699:0x5d51080]    71130 ms: Mark-sweep (reduce) 408.7 (426.1) -> 407.5 (426.4) MB, 899.4 / 0.0 ms  (average mu = 0.207, current mu = 0.071) allocation failure scavenge might not succeed
@fiora/web: [7699:0x5d51080]    72082 ms: Mark-sweep (reduce) 408.6 (423.4) -> 407.8 (424.4) MB, 934.0 / 0.0 ms  (average mu = 0.119, current mu = 0.019) allocation failure scavenge might not succeed
@fiora/web: <--- JS stacktrace --->
@fiora/web: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
@fiora/web:  1: 0xa3ad50 node::Abort() [webpack]
@fiora/web:  2: 0x970199 node::FatalError(char const*, char const*) [webpack]
@fiora/web:  3: 0xbba90e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [webpack]
@fiora/web:  4: 0xbbac87 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [webpack]
@fiora/web:  5: 0xd76ea5  [webpack]
@fiora/web:  6: 0xd77a2f  [webpack]
@fiora/web:  7: 0xd8586b v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [webpack]
@fiora/web:  8: 0xd8942c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [webpack]
@fiora/web:  9: 0xd57b0b v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [webpack]
@fiora/web: 10: 0x10a015f v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [webpack]
@fiora/web: 11: 0x1449379  [webpack]
@fiora/web: error Command failed with exit code 1.
@fiora/web: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run build:web exited 1 in '@fiora/web'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

npm log:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/root/.nvm/versions/node/v14.21.3/bin/node',
1 verbose cli   '/root/.nvm/versions/node/v14.21.3/bin/npm',
1 verbose cli   'run',
1 verbose cli   'build:web'
1 verbose cli ]
2 info using npm@6.14.18
3 info using node@v14.21.3
4 verbose run-script [ 'prebuild:web', 'build:web', 'postbuild:web' ]
5 info lifecycle fiora@1.0.0~prebuild:web: fiora@1.0.0
6 info lifecycle fiora@1.0.0~build:web: fiora@1.0.0
7 verbose lifecycle fiora@1.0.0~build:web: unsafe-perm in lifecycle true
8 verbose lifecycle fiora@1.0.0~build:web: PATH: /root/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/username/fiora/node_modules/.bin:/root/.nvm/versions/node/v14.21.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle fiora@1.0.0~build:web: CWD: /home/username/fiora
10 silly lifecycle fiora@1.0.0~build:web: Args: [ '-c', 'npx lerna run build:web --stream' ]
11 silly lifecycle fiora@1.0.0~build:web: Returned: code: 1  signal: null
12 info lifecycle fiora@1.0.0~build:web: Failed to exec build:web script
13 verbose stack Error: fiora@1.0.0 build:web: `npx lerna run build:web --stream`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/root/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:400:28)
13 verbose stack     at ChildProcess.<anonymous> (/root/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:400:28)
13 verbose stack     at maybeClose (internal/child_process.js:1088:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
14 verbose pkgid fiora@1.0.0
15 verbose cwd /home/username/fiora
16 verbose Linux 5.15.0-1041-azure
17 verbose argv "/root/.nvm/versions/node/v14.21.3/bin/node" "/root/.nvm/versions/node/v14.21.3/bin/npm" "run" "build:web"
18 verbose node v14.21.3
19 verbose npm  v6.14.18
20 error code ELIFECYCLE
21 error errno 1
22 error fiora@1.0.0 build:web: `npx lerna run build:web --stream`
22 error Exit status 1
23 error Failed at the fiora@1.0.0 build:web script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]