V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
20498860
V2EX  ›  前端开发

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

  •  
  •   20498860 · 2022-03-02 17:57:18 +08:00 · 957 次点击
    这是一个创建于 1005 天前的主题,其中的信息可能已经有所发展或是发生改变。
    node 16.14.0
    npm 6.14.16

    我麻了,linux 报错甚至是 speed-measure-webpack-plugin 把时间算完后报错的,写在 log 文件里,文件在二楼
    20498860
        1
    20498860  
    OP
       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 [email protected]
    3 info using [email protected]
    4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
    5 info lifecycle [email protected]~prebuild: [email protected]
    6 info lifecycle [email protected]~build: [email protected]
    7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
    8 verbose lifecycle [email protected]~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 [email protected]~build: CWD: /opt/deploy/source/frontend/frontent-platform-customer.test.webpack.speed/frontend-platform-customer
    10 silly lifecycle [email protected]~build: Args: [ '-c', 'node --max_old_space_size=4096 build/build.js' ]
    11 silly lifecycle [email protected]~build: Returned: code: 1 signal: null
    12 info lifecycle [email protected]~build: Failed to exec build script
    13 verbose stack Error: [email protected] 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 [email protected]
    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 [email protected] build: `node --max_old_space_size=4096 build/build.js`
    22 error Exit status 1
    23 error Failed at the [email protected] build script.
    23 error This is probably not a problem with npm. There is likely additional logging output above.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   918 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 20:29 · PVG 04:29 · LAX 12:29 · JFK 15:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.