taurine icon indicating copy to clipboard operation
taurine copied to clipboard

No available node version satisfies 'node20'

Open SimonSiefke opened this issue 1 year ago • 1 comments

Reproduction steps

  1. Use Node Version 20.3.1
  2. Use pnpm version 8.6.9
  3. Run the following commands:
git clone [email protected]:Perfect7M/taurine.git &&
cd taurine &&
pnpm install &&
npm run dev

Output

npm run dev

> [email protected] dev
> run-p server:dev app:dev


> [email protected] server:dev
> node scripts/watch-server.js


> [email protected] 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/[email protected]/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
> [email protected]
> Targets not specified. Assuming:
  node20-linux-x64
> Error! No available node version satisfies 'node20'
    at makeError (/home/simon/.cache/repos/taurine/node_modules/.pnpm/[email protected]/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/home/simon/.cache/repos/taurine/node_modules/.pnpm/[email protected]/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/[email protected]/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: '> [email protected]\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'

SimonSiefke avatar Jul 21 '23 09:07 SimonSiefke

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

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

hamyyy avatar Aug 14 '23 23:08 hamyyy