Closed wszqkzqk closed 4 years ago
我这编译是没问题的,你传一下log文件
删除一下node_modules 目录然后重新安装试试
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build:linux' ]
2 info using npm@6.13.6
3 info using node@v13.7.0
4 verbose run-script [ 'prebuild:linux', 'build:linux', 'postbuild:linux' ]
5 info lifecycle cocomusic@2.0.6~prebuild:linux: cocomusic@2.0.6
6 info lifecycle cocomusic@2.0.6~build:linux: cocomusic@2.0.6
7 verbose lifecycle cocomusic@2.0.6~build:linux: unsafe-perm in lifecycle true
8 verbose lifecycle cocomusic@2.0.6~build:linux: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/wszqkzqk/文档/projects/CoCoMusic/node_modules/.bin:/home/wszqkzqk/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
9 verbose lifecycle cocomusic@2.0.6~build:linux: CWD: /home/wszqkzqk/文档/projects/CoCoMusic
10 silly lifecycle cocomusic@2.0.6~build:linux: Args: [
10 silly lifecycle '-c',
10 silly lifecycle 'node .electron-vue/build.js && electron-builder -l tar.xz deb AppImage pacman'
10 silly lifecycle ]
11 silly lifecycle cocomusic@2.0.6~build:linux: Returned: code: 1 signal: null
12 info lifecycle cocomusic@2.0.6~build:linux: Failed to exec build:linux script
13 verbose stack Error: cocomusic@2.0.6 build:linux: node .electron-vue/build.js && electron-builder -l tar.xz deb AppImage pacman
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.node .electron-vue/build.js && electron-builder -l tar.xz deb AppImage pacman
22 error Exit status 1
23 error Failed at the cocomusic@2.0.6 build:linux script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
首先pull最新的代码在代码目录执行操作
sudo pacman -S nodejs-lts-erbium npm node node-gyp
# 安装node lts长期支持版本12,会与包 nodejs冲突,删除nodejs
rm -rf node_modules
# 删除依赖
npm i
# 重新安装依赖
npm run build:linux
# 构建
我也是manjaro,使用上面的步骤构建没有问题出现
还是不行
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build:linux' ]
2 info using npm@6.13.6
3 info using node@v12.14.1
4 verbose run-script [ 'prebuild:linux', 'build:linux', 'postbuild:linux' ]
5 info lifecycle cocomusic@2.0.6~prebuild:linux: cocomusic@2.0.6
6 info lifecycle cocomusic@2.0.6~build:linux: cocomusic@2.0.6
7 verbose lifecycle cocomusic@2.0.6~build:linux: unsafe-perm in lifecycle true
8 verbose lifecycle cocomusic@2.0.6~build:linux: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/wszqkzqk/文档/projects/CoCoMusic/node_modules/.bin:/home/wszqkzqk/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
9 verbose lifecycle cocomusic@2.0.6~build:linux: CWD: /home/wszqkzqk/文档/projects/CoCoMusic
10 silly lifecycle cocomusic@2.0.6~build:linux: Args: [
10 silly lifecycle '-c',
10 silly lifecycle 'node .electron-vue/build.js && electron-builder -l tar.xz deb AppImage pacman'
10 silly lifecycle ]
11 silly lifecycle cocomusic@2.0.6~build:linux: Returned: code: 1 signal: null
12 info lifecycle cocomusic@2.0.6~build:linux: Failed to exec build:linux script
13 verbose stack Error: cocomusic@2.0.6 build:linux: node .electron-vue/build.js && electron-builder -l tar.xz deb AppImage pacman
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.node .electron-vue/build.js && electron-builder -l tar.xz deb AppImage pacman
22 error Exit status 1
23 error Failed at the cocomusic@2.0.6 build:linux script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
bug详情描述 编译失败
如何重现bug呢 manjaro下变异
截图 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! cocomusic@2.0.6 build:linux:
node .electron-vue/build.js && electron-builder -l tar.xz deb AppImage pacman
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the cocomusic@2.0.6 build:linux script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! /home/wszqkzqk/.npm/_logs/2020-02-10T02_52_47_861Z-debug.log
桌面信息: