skip to Main Content

I am not able to create a strapi app using the command npx create-strapi-app@latest my-project –quickstart. I tried several times, but sometimes, it is stuck at installing dependencies or sometimes it failed to install by saying that this module is deprecated or not found.
Someone please help me with this!!

Error while installing dependencies:
warning @strapi/strapi > koa-session > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
warning @strapi/strapi > koa-body > [email protected]: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: 
warning @strapi/strapi > @strapi/admin > react-router > [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
warning @strapi/strapi > @strapi/admin > node-polyfill-webpack-plugin > url > [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning @strapi/strapi > @strapi/plugin-email > @strapi/provider-email-sendmail > sendmail > [email protected]: This project is unmaintained
warning @strapi/strapi > @strapi/plugin-email > @strapi/provider-email-sendmail > sendmail > mailcomposer > [email protected]: This project is unmaintained
warning @strapi/strapi > @strapi/generators > plop > liftoff > findup-sync > micromatch > snapdragon > [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
warning @strapi/strapi > @strapi/generators > plop > liftoff > findup-sync > micromatch > snapdragon > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
warning @strapi/strapi > @strapi/generators > plop > liftoff > findup-sync > micromatch > snapdragon > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning @strapi/strapi > @strapi/generators > plop > liftoff > findup-sync > micromatch > snapdragon > source-map-resolve > [email protected]: See https://github.com/lydell/source-map-url#deprecated
warning @strapi/plugin-users-permissions > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning @strapi/plugin-users-permissions > request > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
warning @strapi/plugin-users-permissions > request > [email protected]: this library is no longer supported
warning "@strapi/plugin-users-permissions > @strapi/[email protected]" has unmet peer dependency "webpack@^5.74.0".
error C:UsersadityOneDriveDesktopmy-pronode_modulesbetter-sqlite3: Command failed.
Exit code: 1
Command: prebuild-install || npm run build-release
Arguments:
Directory: C:UsersadityOneDriveDesktopmy-pronode_modulesbetter-sqlite3
Output:
prebuild-install warn install No prebuilt binaries found (target=18.12.0 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:UsersadityAppDataLocalProgramsPythonPython311python.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:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:122:47)
gyp ERR! stack     at C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:75:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:364:14)
gyp ERR! stack     at C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:71:14
gyp ERR! stack     at C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:385:16
gyp ERR! stack     at C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibutil.js:54:7
gyp ERR! stack     at C:Program Filesnodejsnode_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.22621
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd C:UsersadityOneDriveDesktopmy-pronode_modulesbetter-sqlite3
gyp ERR! node -v v18.12.0
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.
Fix the issues mentioned in the installation errors and try to run the following command:

cd C:UsersadityOneDriveDesktopmy-pro && yarn install

2

Answers


  1. switch to Node v14 <= v16.x.x and then try again

    The issue might be because your Node version is >v16

    Login or Signup to reply.
  2. This happens due to node version, and only v14 seems to work. Though strapi’s docs state that v16 and v18 are supported, it also states that you need npm v6 ONLY.

    So here’s what worked for me:

    nvm install 14
    

    And this will install v14 on your local device – note that it doesn’t replace your existing node (maybe you have v18 ?). nvm allows you to use multiple node versions and switch between them as required.

    nvm use 14
    

    It will return the following:

    Now using node v14.21.2 (npm v6.14.17)

    now run:

    npx create-strapi-app project-name
    

    It should install and open up localhost for strapi admin in your browser

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