Search code examples
node.jsnpmstrapinpx

Issue installing strapi on a shared VPS


i'm trying to install strapi on the shared VPS i got

so i'm running /opt/alt/alt-nodejs14/root/usr/bin/npx create-strapi-app@latest strapi as recommended in the installation page

and i got this error

426 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-windows-arm64@0.14.43: wanted {"os":"win32","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
427 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    win32
427 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  arm64
427 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   linux
427 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
428 warn optional SKIPPING OPTIONAL DEPENDENCY: esbuild-windows-64@0.14.43 (node_modules/esbuild/node_modules/esbuild-windows-64):
429 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-windows-64@0.14.43: wanted {"os":"win32","arch":"x64"} (current: {"os":"linux","arch":"x64"})
430 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    win32
430 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  x64
430 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   linux
430 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
431 warn @strapi/design-system@1.1.1 requires a peer of @strapi/icons@^0.0.1-alpha.73 but none is installed. You must install peer dependencies yourself.
432 warn @strapi/helper-plugin@4.2.0 requires a peer of qs@6.10.1 but none is installed. You must install peer dependencies yourself.
433 warn react-virtualized@9.22.3 requires a peer of react@^15.3.0 || ^16.0.0-alpha but none is installed. You must install peer dependencies yourself.
434 warn react-virtualized@9.22.3 requires a peer of react-dom@^15.3.0 || ^16.0.0-alpha but none is installed. You must install peer dependencies yourself.
435 verbose stack Error: better-sqlite3@7.4.6 install: `prebuild-install || npm run build-release`
435 verbose stack spawn ENOENT
435 verbose stack     at ChildProcess.<anonymous> (/opt/alt/alt-nodejs14/root/usr/lib/node_modules/npm/node_modules.bundled/npm-lifecycle/lib/spawn.js:48:18)
435 verbose stack     at ChildProcess.emit (events.js:375:28)
435 verbose stack     at maybeClose (internal/child_process.js:1055:16)
435 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
436 verbose pkgid better-sqlite3@7.4.6
437 verbose cwd /home/xcddwtvp/strapi
438 verbose Linux 3.10.0-962.3.2.lve1.5.60.el7.x86_64
439 verbose argv "/opt/alt/alt-nodejs14/root/usr/bin/node" "/opt/alt/alt-nodejs14/root/usr/bin/npm" "install"
440 verbose node v14.17.3
441 verbose npm  v6.14.13
442 error code ELIFECYCLE
443 error syscall spawn
444 error file sh
445 error errno ENOENT
446 error better-sqlite3@7.4.6 install: `prebuild-install || npm run build-release`
446 error spawn ENOENT
447 error Failed at the better-sqlite3@7.4.6 install script.
447 error This is probably not a problem with npm. There is likely additional logging output above.
448 verbose exit [ 1, true ]

I can't use yarn because it's not on the VPS & i can't install it, can anyone help me ?

i'm using Planethost hoster "The World" isolated vps

Thanks you in advance


Solution

  • I see that your node version is 14.17.3, but Strapi needs:

      ...
      "engines": {
        "node": ">=14.19.1 <=16.x.x",
        "npm": ">=6.0.0"
      }
    

    From: https://github.com/strapi/strapi/blob/master/package.json.

    While you're at it, I'd suggest using Node v16.x