Does not build/run on M1 Mac
Closed this issue · 1 comments
Hi,
I get the following error when I tried to build/run tauri:
`> node scripts/build-server.js
✖ [TAURINE] Cannot build server
/Users/dre/gitRepos/taurine/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js:60
error = new Error(message);
^
Error: Command failed with exit code 2: node_modules/.bin/pkg package.json --output src-tauri/binaries/app
pkg@5.2.1
Targets not specified. Assuming:
node18-macos-arm64
Error! No available node version satisfies 'node18'
at makeError (/Users/dre/gitRepos/taurine/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js:60:11)
at handlePromise (/Users/dre/gitRepos/taurine/node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js:118:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async main (file:///Users/dre/gitRepos/taurine/scripts/build-server.js:50:5)
at async oraPromise (file:///Users/dre/gitRepos/taurine/node_modules/.pnpm/ora@6.1.2/node_modules/ora/index.js:368:18) {
shortMessage: 'Command failed with exit code 2: node_modules/.bin/pkg package.json --output src-tauri/binaries/app',
command: 'node_modules/.bin/pkg package.json --output src-tauri/binaries/app',
escapedCommand: '"node_modules/.bin/pkg" package.json --output "src-tauri/binaries/app"',
exitCode: 2,
signal: undefined,
signalDescription: undefined,
stdout: '> pkg@5.2.1\n' +
'> Targets not specified. Assuming:\n' +
' node18-macos-arm64\n' +
"> Error! No available node version satisfies 'node18'",
stderr: '',
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
Node.js v18.7.0
ELIFECYCLE Command failed with exit code 1.
ERROR: "server:build" exited with 1.
ELIFECYCLE Command failed with exit code 1.
Error beforeBuildCommand pnpm build
failed with exit code 1
ELIFECYCLE Command failed with exit code 1.`
Hi @DreFlexGen,
Thanks for reporting this.
Pkg adds support to node 18 from 5.70.
You should upgrade it in your project to at least this version.
Just upgraded the pkg
dependency to 5.8
and everything works fine.
Closing this issue. Please reopen it if you have any additional questions.