vue 项目,同一版本 node、npm, windows 可以编译, Linux 不行

2022-03-02 17:57:18 +08:00
 20498860
node 16.14.0
npm 6.14.16

我麻了,linux 报错甚至是 speed-measure-webpack-plugin 把时间算完后报错的,写在 log 文件里,文件在二楼
776 次点击
所在节点    前端开发
1 条回复
20498860
2022-03-02 17:57:29 +08:00
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using npm@6.14.15
3 info using node@v16.14.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle vue-admin-template@3.8.0~prebuild: vue-admin-template@3.8.0
6 info lifecycle vue-admin-template@3.8.0~build: vue-admin-template@3.8.0
7 verbose lifecycle vue-admin-template@3.8.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle vue-admin-template@3.8.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/deploy/source/frontend/frontent-platform-customer.test.webpack.speed/frontend-platform-customer/node_modules/.bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/kafka/bin:/usr/java/jdk1.8.0_121/bin:/opt/scala/bin:/opt/spark/bin:/home/apps/.local/bin:/home/apps/bin:/opt/php/php7214/bin:/opt/composer/composer185/
9 verbose lifecycle vue-admin-template@3.8.0~build: CWD: /opt/deploy/source/frontend/frontent-platform-customer.test.webpack.speed/frontend-platform-customer
10 silly lifecycle vue-admin-template@3.8.0~build: Args: [ '-c', 'node --max_old_space_size=4096 build/build.js' ]
11 silly lifecycle vue-admin-template@3.8.0~build: Returned: code: 1 signal: null
12 info lifecycle vue-admin-template@3.8.0~build: Failed to exec build script
13 verbose stack Error: vue-admin-template@3.8.0 build: `node --max_old_space_size=4096 build/build.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (node:events:520:28)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (node:events:520:28)
13 verbose stack at maybeClose (node:internal/child_process:1092:16)
13 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)14 verbose pkgid vue-admin-template@3.8.0
15 verbose cwd /opt/deploy/source/frontend/frontent-platform-customer.test.webpack.speed/frontend-platform-customer
16 verbose Linux 3.10.0-862.el7.x86_64
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v16.14.0
19 verbose npm v6.14.15
20 error code ELIFECYCLE
21 error errno 1
22 error vue-admin-template@3.8.0 build: `node --max_old_space_size=4096 build/build.js`
22 error Exit status 1
23 error Failed at the vue-admin-template@3.8.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/837509

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX