marcincodes / taurine

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

No available node version satisfies 'node20' #6

Open SimonSiefke opened 1 year ago

SimonSiefke commented 1 year ago

Reproduction steps

  1. Use Node Version 20.3.1
  2. Use pnpm version 8.6.9
  3. Run the following commands:
git clone git@github.com:Perfect7M/taurine.git &&
cd taurine &&
pnpm install &&
npm run dev

Output

npm run dev

> taurine@0.1.0 dev
> run-p server:dev app:dev

> taurine@0.1.0 server:dev
> node scripts/watch-server.js

> taurine@0.1.0 app:dev
> vite --config vite.config.ts

- [TAURINE] Building server...

  VITE v3.0.2  ready in 478 ms

  ➜  Local:   http://localhost:1420/
  ➜  Network: use --host to expose
✖ [TAURINE] Cannot build server
/home/simon/.cache/repos/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:
  node20-linux-x64
> Error! No available node version satisfies 'node20'
    at makeError (/home/simon/.cache/repos/taurine/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/home/simon/.cache/repos/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:///home/simon/.cache/repos/taurine/scripts/build-server.js:50:5)
    at async oraPromise (file:///home/simon/.cache/repos/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' +
    '  node20-linux-x64\n' +
    "> Error! No available node version satisfies 'node20'",
  stderr: '',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Expected behaviour

When running npm run dev, the app launches and no error is shown

Actual behaviour

When running npm run dev, an error is shown No available node version satisfies 'node20'

hamyyy commented 1 year ago

I believe node20 has the pkg package functionality built in. I presume it will be deprecated.

https://nodejs.org/api/single-executable-applications.html