marcincodes / taurine

Tauri + Node.js stater - electron alternative packed with some goodies
MIT License
146 stars 10 forks source link

Failed to run on M1, MacOs 12.6.3 #4

Open MikeUdin opened 1 year ago

MikeUdin commented 1 year ago

Hello! During the installation a have this error message:

> mikeudin@Mikes-MacBook-Air taurine % pnpm install

Packages: +395 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Packages are copied from the content-addressable store to the virtual store. Content-addressable store is at: /Users/mikeudin/Library/pnpm/store/v3 Virtual store is at: node_modules/.pnpm node_modules/.pnpm/esbuild@0.14.54/node_modules/esbuild: Running postinstall script, done in 140ms node_modules/.pnpm/esbuild@0.15.9/node_modules/esbuild: Running postinstall script, done in 300ms Progress: resolved 444, reused 395, downloaded 0, added 395, done

dependencies:

  • @fastify/cors 8.1.0
  • @tauri-apps/api 1.1.0
  • @trpc/client 9.27.2
  • @trpc/react 9.27.2
  • @trpc/server 9.27.2
  • fastify 4.5.3
  • react 18.2.0
  • react-dom 18.2.0
  • react-query 3.39.2
  • zod 3.19.0

devDependencies:

  • @tauri-apps/cli 1.1.1
  • @types/node 18.7.10
  • @types/react 18.0.15
  • @types/react-dom 18.0.6
  • @vitejs/plugin-react 2.0.0
  • chokidar 3.5.3
  • esbuild 0.15.9
  • execa 5.1.1
  • npm-run-all 4.1.5
  • ora 6.1.2
  • pkg 5.8.0
  • typescript 4.6.4
  • vite 3.0.2

Done in 2.8s > mikeudin@Mikes-MacBook-Air taurine % pnpm tauri dev

taurine@0.1.0 tauri /Users/mikeudin/Documents/Git/taurine tauri "dev"

 Running BeforeDevCommand (`pnpm dev`)

taurine@0.1.0 dev /Users/mikeudin/Documents/Git/taurine run-p server:dev app:dev

taurine@0.1.0 server:dev /Users/mikeudin/Documents/Git/taurine node scripts/watch-server.js

taurine@0.1.0 app:dev /Users/mikeudin/Documents/Git/taurine vite --config vite.config.ts

  • [TAURINE] Building server...

    VITE v3.0.2 ready in 284 ms

    ➜ Local: http://localhost:1420/ ➜ Network: use --host to expose ✖ [TAURINE] Cannot build server /Users/mikeudin/Documents/Git/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.8.0 Targets not specified. Assuming: node19-macos-arm64 Error! No available node version satisfies 'node19' at makeError (/Users/mikeudin/Documents/Git/taurine/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js:60:11) at handlePromise (/Users/mikeudin/Documents/Git/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/mikeudin/Documents/Git/taurine/scripts/build-server.js:50:5) at async oraPromise (file:///Users/mikeudin/Documents/Git/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.8.0\n' + '> Targets not specified. Assuming:\n' + ' node19-macos-arm64\n' + "> Error! No available node version satisfies 'node19'", stderr: '', failed: true, timedOut: false, isCanceled: false, killed: false }

Node.js v19.4.0 Info Watching /Users/mikeudin/Documents/Git/taurine/src-tauri for changes... Compiling core-foundation-sys v0.8.3 Compiling objc_exception v0.1.2 Compiling malloc_buf v0.0.6 Compiling scopeguard v1.1.0 Compiling block v0.1.6 .... Compiling ascii v1.0.0 Compiling tauri-runtime-wry v0.10.2 Compiling state v0.5.3 Compiling embed_plist v1.2.2 Compiling chunked_transfer v1.4.0 Compiling tiny_http v0.11.0 Compiling taurine v0.0.0 (/Users/mikeudin/Documents/Git/taurine/src-tauri) Compiling portpicker v0.1.1 error: failed to run custom build command for taurine v0.0.0 (/Users/mikeudin/Documents/Git/taurine/src-tauri)

Caused by: process didn't exit successfully: /Users/mikeudin/Documents/Git/taurine/src-tauri/target/debug/build/taurine-605a84e1425695a2/build-script-build (exit status: 1) --- stdout cargo:rerun-if-env-changed=TAURI_CONFIG cargo:rerun-if-changed=tauri.conf.json cargo:rustc-cfg=dev path matching binaries/app-aarch64-apple-darwin not found. warning: build failed, waiting for other jobs to finish...

 ELIFECYCLE  Command failed.  ELIFECYCLE  Command failed. 🚀 A new version of Tauri CLI is available! [1.2.3]  ELIFECYCLE  Command failed with exit code 101.

Rust installed info:

> mikeudin@Mikes-MacBook-Air ~ % rustup show

Default host: aarch64-apple-darwin rustup home: /Users/mikeudin/.rustup

> stable-aarch64-apple-darwin (default) rustc 1.68.0 (2c8cc3432 2023-03-06)

Rust for M1 installed and worked properly, Tauri sample project complies with no issues. Node v19.4.0 cargo 1.68.0 pkg 5.8.1 What problem can it be?

marcincodes commented 1 year ago

Probably pkg 5.8 is not supporting node 19. Could you please try node 18?

mateutek commented 1 year ago

You have to run the pkg manually 1st time as tauri doesn't have the files yet. Probably some race conditions, haven't debugged this a lot, but at least i can run this on my m1

kreivc commented 1 year ago

@mateutek Hi I have same problem, what do you mean run the pkg manually?

VityaSchel commented 11 months ago

@mateutek Hi I have same problem, what do you mean run the pkg manually?

It means running pkg package.json --output src-tauri/binaries/app after installing pkg