【问题标题】:Tauri 'dev' and 'build' failed on UbuntuTauri \'dev\' 和 \'build\' 在 Ubuntu 上失败
【发布时间】:2022-09-30 03:28:21
【问题描述】:

我正在尝试通过官方文档在 Ubuntu 16.4.7 (LTS) 上构建 tauri 应用程序,在 sudo npm run tauri devsudo npm run tauri build 命令之后我有很多错误。日志文件:

0 info it worked if it ends with ok
1 verbose cli [ \'/usr/bin/nodejs\', \'/usr/bin/npm\', \'run\', \'tauri\', \'dev\' ]
2 info using npm@3.5.2
3 info using node@v4.2.6
4 verbose run-script [ \'pretauri\', \'tauri\', \'posttauri\' ]
5 info lifecycle tauri-app@1.0.0~pretauri: tauri-app@1.0.0
6 silly lifecycle tauri-app@1.0.0~pretauri: no script for pretauri, continuing
7 info lifecycle tauri-app@1.0.0~tauri: tauri-app@1.0.0
8 verbose lifecycle tauri-app@1.0.0~tauri: unsafe-perm in lifecycle true
9 verbose lifecycle tauri-app@1.0.0~tauri: PATH: /usr/share/npm/bin/node-gyp-bin:/home/roman/Desktop/tauri-svelte/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
10 verbose lifecycle tauri-app@1.0.0~tauri: CWD: /home/roman/Desktop/tauri-svelte
11 silly lifecycle tauri-app@1.0.0~tauri: Args: [ \'-c\', \'tauri \"dev\"\' ]
12 info lifecycle tauri-app@1.0.0~tauri: Failed to exec tauri script
13 verbose stack Error: tauri-app@1.0.0 tauri: `tauri \"dev\"`
13 verbose stack spawn ENOENT
13 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:17:16)
13 verbose stack     at emitTwo (events.js:87:13)
13 verbose stack     at ChildProcess.emit (events.js:172:7)
13 verbose stack     at maybeClose (internal/child_process.js:821:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid tauri-app@1.0.0
15 verbose cwd /home/roman/Desktop/tauri-svelte
16 error Linux 4.15.0-142-generic
17 error argv \"/usr/bin/nodejs\" \"/usr/bin/npm\" \"run\" \"tauri\" \"dev\"
18 error node v4.2.6
19 error npm  v3.5.2
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error tauri-app@1.0.0 tauri: `tauri \"dev\"`
24 error spawn ENOENT
25 error Failed at the tauri-app@1.0.0 tauri script \'tauri \"dev\"\'.
25 error Make sure you have the latest version of node.js and npm installed.
25 error If you do, this is most likely a problem with the tauri-app package,
25 error not with npm itself.
25 error Tell the author that this fails on your system:
25 error     tauri \"dev\"
25 error You can get information on how to open an issue for this project with:
25 error     npm bugs tauri-app
25 error Or if that isn\'t available, you can get their info via:
25 error     npm owner ls tauri-app
25 error There is likely additional logging output above.
26 verbose exit [ 1, true ]

它适用于窗户

node --version -> 17.8.0
npm --version -> 8.5.5

    标签: node.js linux ubuntu npm tauri


    【解决方案1】:

    我能够通过更新到更新版本的 Ubuntu 来解决我的问题。

    【讨论】:

    • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
    • 该答案无法提供可验证的信息并且使问题变得微不足道。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-07-24
    • 1970-01-01
    • 2018-01-20
    • 2014-12-15
    • 2019-08-23
    • 2019-11-05
    • 2021-05-20
    相关资源
    最近更新 更多