我正在尝试在开发人员模式下运行电子应用程序。 我已经从github克隆了该项目并进行了yarn安装。当我在服务后使用电子构建器为项目提供服务时,出现以下错误,浏览器窗口关闭。这是在上菜后发生的。 错误如下:
Date: 2018-12-28T11:45:32.922Z
Hash: 738b2924fa673b20d893
Time: 20743ms
chunk {main} main.js, main.js.map (main) 375 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 233 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 2.02 MB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 7.69 MB [initial] [rendered]
ℹ 「wdm」: Compiled successfully.
npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1545997508035-0.9439987616631156/node but npm is using /usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
> Trackly@5.2.14 electron:serve-tsc
/home/agile/Desktop/yarnappnew/TimeTrackingApp_Electron-master
(2)/TimeTrackingApp_Electron-master
> tsc -p tsconfig-serve.json
Gtk-Message: 17:15:40.595: GtkDialog mapped without a transient parent. This is discouraged.
PID 786 received SIGSEGV for address: 0x10
/home/agile/Desktop/yarnappnew/TimeTrackingApp_Electron-master (2)/TimeTrackingApp_Electron-master/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x2f27)[0x7f3552257f27]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f3565c65890]
/lib/x86_64-linux-gnu/libpthread.so.0(pthread_mutex_lock+0x0)[0x7f3565c5cfa0]
/usr/lib/x86_64-linux-gnu/libX11.so.6(XrmQGetResource+0x4a)[0x7f35622bbaaa]
/usr/lib/x86_64-linux-gnu/libX11.so.6(XGetDefault+0xd6)[0x7f3562297856]
/usr/lib/x86_64-linux-gnu/libcairo.so.2(+0x9c81e)[0x7f356475581e]
/usr/lib/x86_64-linux-gnu/libcairo.so.2(+0x9f270)[0x7f3564758270]
/usr/lib/x86_64-linux-gnu/libcairo.so.2(cairo_surface_get_font_options+0x80)[0x7f3564728270]
/usr/lib/x86_64-linux-gnu/libcairo.so.2(+0x2c362)[0x7f35646e5362]
/usr/lib/x86_64-linux-gnu/libcairo.so.2(+0x2f464)[0x7f35646e8464]
/usr/lib/x86_64-linux-gnu/libcairo.so.2(cairo_show_glyphs+0x24)[0x7f35646da344]
/usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0(+0x848b)[0x7f3564e5148b]
/usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0(+0x86bc)[0x7f3564e516bc]
/usr/lib/x86_64-linux-gnu/libpango-1.0.so.0(pango_renderer_draw_glyph_item+0x3e)[0x7f3564c2520e]
/usr/lib/x86_64-linux-gnu/libpango-1.0.so.0(pango_renderer_draw_layout_line+0x471)[0x7f3564c25ca1]
/usr/lib/x86_64-linux-gnu/libpango-1.0.so.0(pango_renderer_draw_layout+0x125)[0x7f3564c26075]
/usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0(+0x894a)[0x7f3564e5194a]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_render_layout+0x18d)[0x7f35655f3d7d]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x219a81)[0x7f3565565a81]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x16ef2d)[0x7f35654baf2d]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x173b83)[0x7f35654bfb83]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x216c31)[0x7f3565562c31]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x382eab)[0x7f35656ceeab]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_container_propagate_draw+0x1ea)[0x7f35654b5eea]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x169fd2)[0x7f35654b5fd2]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x11da34)[0x7f3565469a34]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x16ef2d)[0x7f35654baf2d]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x173b83)[0x7f35654bfb83]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x120341)[0x7f356546c341]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x382eab)[0x7f35656ceeab]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_container_propagate_draw+0x1ea)[0x7f35654b5eea]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x169fd2)[0x7f35654b5fd2]
节点版本为8.14.0,角度版本为6。操作系统为Ubuntu 18.04.1。
我已经搜索了很多有关此错误的信息,但结果很少,结果也没那么有用。我什至不知道Gtk是什么,但仍然可以安装GTK。
Package.json
"scripts": {
"postinstall": "npm run postinstall:electron && npx electron-builder install-app-deps",
"postinstall:web": "node postinstall-web",
"postinstall:electron": "node postinstall",
"ng": "ng",
"start": "npm run postinstall:electron && npm-run-all -p ng:serve electron:serve",
"build": "npm run postinstall:electron && npm run electron:serve-tsc && ng build",
"build:dev": "npm run build -- -c dev",
"build:prod": "npm run build -- -c production",
"ng:serve": "ng serve",
"ng:serve:web": "npm run postinstall:web && ng serve -o",
"electron:serve-tsc": "tsc -p tsconfig-serve.json",
"electron:serve": "wait-on http-get://localhost:4200/ && npm run electron:serve-tsc && electron . --serve",
"electron:local": "npm run build:prod && electron .",
"electron:linux": "npm run build:prod && npx electron-builder build --linux",
"electron:windows": "npm run build:prod && npx electron-builder build --windows",
"electron:mac": "npm run build:prod && npx electron-builder build --mac",
"test": "npm run postinstall:web && ng test",
"e2e": "npm run postinstall:web && ng e2e",
"version": "conventional-changelog -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md"
},
请帮助。谢谢。