skip to Main Content

When trying to install strapi with npx create-strapi-app@latest my-project

, an error appears. Everything used to work fine, now it doesn’t want to install. In general, I can not solve the problem anywhere. Also tried reinstalling Python, node, sqlite3, gyp and nothing helped. Here is the error code

Creating a new Strapi application at D:nexttraversymy-project.
Creating files.
error D:nexttraversymy-projectnode_modulesbetter-sqlite3: Command failed.
Exit code: 1
Command: prebuild-install || npm run build-release
Arguments:
Directory: D:nexttraversymy-projectnode_modulesbetter-sqlite3
Output:
prebuild-install warn install No prebuilt binaries found (target=18.12.1 runtime=node arch=x64 libc= platform=win32)

> [email protected] build-release
> node-gyp rebuild --release

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.11.0 found at "C:UserszaytsAppDataLocalProgramsPythonPython311python.exe"
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (C:UserszaytsAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:122:47)
gyp ERR! stack     at C:UserszaytsAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:75:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:UserszaytsAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:364:14)
gyp ERR! stack     at C:UserszaytsAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:71:14
gyp ERR! stack     at C:UserszaytsAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:385:16
gyp ERR! stack     at C:UserszaytsAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gyplibutil.js:54:7
gyp ERR! stack     at C:UserszaytsAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gyplibutil.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:420:5)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\zayts\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd D:nexttraversymy-projectnode_modulesbetter-sqlite3
gyp ERR! node -v v18.12.1
gyp ERR! node-gyp -v v9.1.0
gyp ERR! not ok

Keep trying!

Oh, it seems that you encountered errors while installing dependencies in your project.
Don't give up, your project was created correctly.```

2

Answers


  1. Not sure why, but the error states this:

    gyp ERR! find VS **************************************************************
    gyp ERR! find VS You need to install the latest version of Visual Studio
    gyp ERR! find VS including the "Desktop development with C++" workload.
    gyp ERR! find VS For more information consult the documentation at:
    gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
    gyp ERR! find VS **************************************************************
    gyp ERR! find VS
    

    I’m guessing you are missing some node js dependencies, you prolly want to re download node and check the Install Prerequisites check box https://nodejs.org/en/download/

    The error probably points to some VC_redist

    Login or Signup to reply.
  2. Check the most suited node version from strapi doc.
    https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/installation/cli.html#preparing-the-installation

    in my case, I simply downgraded my node version from 18 to 16, and the strapi installed everything without a single error or warning.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search