Errors when installing strapi (npx create-strapi-app@latest my-project)

System Information
  • Strapi Version: “4.1.8”
  • Operating System: “MacOS Montery Apple M1 v12.3”
  • Database:
  • Node Version: “16.14.2”
  • NPM Version: “8.5.0”
  • Yarn Version: “1.22.18”

Strapi Install Errors

Strapi Version: 4.1.8
Operating System: MacOS Montery Apple M1 v12.3
Node Version: 16.14.2
NPM Version: 8.5.0
NVM Version: 0.39.1
Yarn Version: 1.22.18
node-gyp version: 9.0.0

I’ve been getting multiple install errors when trying to install strapi (I see a lot of node-gyp err & sqllite3).
I have a Mac M1 and it was recently updated and was not having issues before.
I use NVM but have not had problems before.
I tried installing with both npm (npx create-strapi-app@latest my-project) & yarn (yarn create strapi-app my-project --quickstart) and have the same problems.
I’ve noticed that some of the dependencies are installed in completely different folders.

I’ve tried…

  • Changed package.json - ( “better-sqlite3”: “7.4.6” → “better-sqlite3”: “5.0.0” - strapi/strapi/issues/9080 )
  • Uninstall/reinstall node-gyp - (used their mac instructions)
  • Uninstall/reinstall npm packages
  • Checking xcode is installed ( yes → /Applications/Xcode.app/Contents/Developer )

I’ve read pretty much every forum and stack overflow question about this and have found no fix. I’ve specifically looked at previous posts (Cannot create new strapi project - mac - #4 by Daniel_Gustavsson); (strapi not installing with yarn create strapi-app my-project --quickstart · Issue #9120 · strapi/strapi · GitHub) and their solutions and I’ve had no luck.
Please help! Thanks.


Example:

What I did…

  • “npx create-strapi-app@latest my-project” → (got errors & cd into my-project && yarn install)
  • “cd my-project && yarn-install” → (got same errors)

Terminal Output:

➜  forumquestion npx create-strapi-app@latest my-project
? Choose your installation type Quickstart (recommended)
Creating a quickstart project.
Creating a new Strapi application at /Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project.
Creating files.
Error while installing dependencies:
warning ../../../../../../package.json: No license field
warning @strapi/strapi > koa-ip > debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
warning @strapi/strapi > uuid@3.4.0: 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 > @strapi/generate-new > uuid@3.4.0: 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-session > uuid@3.4.0: 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 > @strapi/admin > @babel/polyfill@7.12.1: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
warning @strapi/strapi > @strapi/admin > @fortawesome/fontawesome-svg-core@1.3.0: Please upgrade to 6.1.0. https://fontawesome.com/docs/changelog/
warning @strapi/strapi > @strapi/plugin-content-type-builder > @strapi/helper-plugin > @fortawesome/fontawesome-svg-core@1.3.0: Please upgrade to 6.1.0. https://fontawesome.com/docs/changelog/
warning @strapi/strapi > koa-body > formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
warning @strapi/strapi > @strapi/admin > @babel/polyfill > core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
warning @strapi/strapi > @strapi/admin > @fortawesome/fontawesome-svg-core > @fortawesome/fontawesome-common-types@0.3.0: Please upgrade to 6.1.0. https://fontawesome.com/docs/changelog/
warning @strapi/strapi > @strapi/admin > node-polyfill-webpack-plugin > url > querystring@0.2.0: 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 > mailcomposer@3.12.0: This project is unmaintained
warning @strapi/strapi > @strapi/plugin-email > @strapi/provider-email-sendmail > sendmail > mailcomposer > buildmail@3.10.0: This project is unmaintained
warning @strapi/strapi > @strapi/generators > plop > liftoff > findup-sync > micromatch > snapdragon > source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
warning @strapi/strapi > @strapi/generators > plop > liftoff > findup-sync > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning @strapi/strapi > @strapi/generators > plop > liftoff > findup-sync > micromatch > snapdragon > source-map-resolve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
warning @strapi/strapi > @strapi/generators > plop > liftoff > findup-sync > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning @strapi/plugin-users-permissions > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @strapi/plugin-users-permissions > request > uuid@3.4.0: 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 > har-validator@5.1.5: this library is no longer supported
warning @strapi/plugin-users-permissions > koa2-ratelimit > sequelize@5.22.5: Please update to v6 or higher! A migration guide can be found here: https://sequelize.org/v6/manual/upgrade-to-v6.html
warning @strapi/plugin-users-permissions > koa2-ratelimit > mongoose > @types/mongodb > @types/bson@4.2.0: This is a stub types definition. bson provides its own type definitions, so you do not need this installed.
warning "@strapi/plugin-users-permissions > react-redux@7.2.3" has unmet peer dependency "redux@^2.0.0 || ^3.0.0 || ^4.0.0-0".
warning "@strapi/plugin-users-permissions > @strapi/helper-plugin@4.1.8" has unmet peer dependency "formik@^2.2.6".
warning "@strapi/plugin-users-permissions > @strapi/helper-plugin@4.1.8" has unmet peer dependency "immer@9.0.6".
warning "@strapi/plugin-users-permissions > @strapi/helper-plugin@4.1.8" has unmet peer dependency "qs@6.10.1".
warning "@strapi/plugin-users-permissions > @strapi/helper-plugin@4.1.8" has unmet peer dependency "react-select@^4.0.2".
warning "@strapi/strapi > @strapi/admin > styled-components@5.3.3" has unmet peer dependency "react-is@>= 16.8.0".
warning "@strapi/strapi > @strapi/admin > react-virtualized@9.22.3" has incorrect peer dependency "react@^15.3.0 || ^16.0.0-alpha".
warning "@strapi/strapi > @strapi/admin > react-virtualized@9.22.3" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0-alpha".
warning "@strapi/plugin-users-permissions > grant-koa@5.4.8" has unmet peer dependency "koa@>=2.0.0".
warning Workspaces can only be enabled in private projects.
error /Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3: Command failed.
Exit code: 1
Command: prebuild-install || npm run build-release
Arguments: 
Directory: /Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3
Output:
prebuild-install WARN install No prebuilt binaries found (target=16.14.2 runtime=node arch=arm64 libc= platform=darwin)

> better-sqlite3@7.4.6 build-release
> node-gyp rebuild --release

gyp info it worked if it ends with ok
gyp info using node-gyp@9.0.0
gyp info using node@16.14.2 | darwin | arm64
gyp info find Python using Python version 3.8.9 found at "/Applications/Xcode.app/Contents/Developer/usr/bin/python3"
gyp info spawn /Applications/Xcode.app/Contents/Developer/usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/Users/kendrawing/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/kendrawing/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/kendrawing/Library/Caches/node-gyp/16.14.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/kendrawing/Library/Caches/node-gyp/16.14.2',
gyp info spawn args   '-Dnode_gyp_dir=/Users/kendrawing/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/kendrawing/Library/Caches/node-gyp/16.14.2/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  TOUCH b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
  ACTION deps_sqlite3_gyp_locate_sqlite3_target_extract_sqlite3 b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
/bin/sh: Practice/Strapi: No such file or directory
/Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3/deps/extract.js:8
process.on('unhandledRejection', (err) => { throw err; });
                                            ^

CwdError: ENOENT: Cannot cd into '/Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3'
    at /Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/tar/lib/mkdir.js:43:12
    at FSReqCallback.oncomplete (node:fs:198:21) {
  path: '/Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3',
  code: 'ENOENT'
}
make: *** [b857c92884e9598d609f6be182a2595df7a8e00f.intermediate] Error 1
rm b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/kendrawing/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:526:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 21.4.0
gyp ERR! command "/Users/kendrawing/.nvm/versions/node/v16.14.2/bin/node" "/Users/kendrawing/node_modules/.bin/node-gyp" "rebuild" "--release"
gyp ERR! cwd /Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3
gyp ERR! node -v v16.14.2
gyp ERR! node-gyp -v v9.0.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 /Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project && yarn install

➜  forumquestion cd my-project
➜  my-project yarn install
yarn install v1.22.18
warning ../../../../../../package.json: No license field
info No lockfile found.
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
warning @strapi/strapi > koa-ip > debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
warning @strapi/strapi > uuid@3.4.0: 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-session > uuid@3.4.0: 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 > @strapi/admin > @babel/polyfill@7.12.1: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
warning @strapi/strapi > @strapi/admin > @fortawesome/fontawesome-svg-core@1.3.0: Please upgrade to 6.1.0. https://fontawesome.com/docs/changelog/
warning @strapi/strapi > @strapi/plugin-content-type-builder > @strapi/helper-plugin > @fortawesome/fontawesome-svg-core@1.3.0: Please upgrade to 6.1.0. https://fontawesome.com/docs/changelog/
warning @strapi/strapi > @strapi/generate-new > uuid@3.4.0: 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 > formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
warning @strapi/strapi > @strapi/admin > @babel/polyfill > core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
warning @strapi/strapi > @strapi/admin > @fortawesome/fontawesome-svg-core > @fortawesome/fontawesome-common-types@0.3.0: Please upgrade to 6.1.0. https://fontawesome.com/docs/changelog/
warning @strapi/strapi > @strapi/plugin-email > @strapi/provider-email-sendmail > sendmail > mailcomposer@3.12.0: This project is unmaintained
warning @strapi/strapi > @strapi/admin > node-polyfill-webpack-plugin > url > querystring@0.2.0: 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 > mailcomposer > buildmail@3.10.0: This project is unmaintained
warning @strapi/strapi > @strapi/generators > plop > liftoff > findup-sync > micromatch > snapdragon > source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
warning @strapi/strapi > @strapi/generators > plop > liftoff > findup-sync > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning @strapi/strapi > @strapi/generators > plop > liftoff > findup-sync > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning @strapi/strapi > @strapi/generators > plop > liftoff > findup-sync > micromatch > snapdragon > source-map-resolve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
warning @strapi/plugin-users-permissions > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @strapi/plugin-users-permissions > request > uuid@3.4.0: 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 > har-validator@5.1.5: this library is no longer supported
warning @strapi/plugin-users-permissions > koa2-ratelimit > sequelize@5.22.5: Please update to v6 or higher! A migration guide can be found here: https://sequelize.org/v6/manual/upgrade-to-v6.html
warning @strapi/plugin-users-permissions > koa2-ratelimit > mongoose > @types/mongodb > @types/bson@4.2.0: This is a stub types definition. bson provides its own type definitions, so you do not need this installed.
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
warning "@strapi/plugin-users-permissions > react-redux@7.2.3" has unmet peer dependency "redux@^2.0.0 || ^3.0.0 || ^4.0.0-0".
warning "@strapi/plugin-users-permissions > @strapi/helper-plugin@4.1.8" has unmet peer dependency "formik@^2.2.6".
warning "@strapi/plugin-users-permissions > @strapi/helper-plugin@4.1.8" has unmet peer dependency "immer@9.0.6".
warning "@strapi/plugin-users-permissions > @strapi/helper-plugin@4.1.8" has unmet peer dependency "qs@6.10.1".
warning "@strapi/plugin-users-permissions > @strapi/helper-plugin@4.1.8" has unmet peer dependency "react-select@^4.0.2".
warning "@strapi/strapi > @strapi/admin > react-virtualized@9.22.3" has incorrect peer dependency "react@^15.3.0 || ^16.0.0-alpha".
warning "@strapi/strapi > @strapi/admin > react-virtualized@9.22.3" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0-alpha".
warning "@strapi/strapi > @strapi/admin > styled-components@5.3.3" has unmet peer dependency "react-is@>= 16.8.0".
warning "@strapi/plugin-users-permissions > grant-koa@5.4.8" has unmet peer dependency "koa@>=2.0.0".
warning Workspaces can only be enabled in private projects.
[5/5] 🔨  Building fresh packages...
[10/12] ⠁ sharp
[-/12] ⠁ waiting...
[-/12] ⠁ waiting...
[11/12] ⠁ better-sqlite3
error /Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3: Command failed.
Exit code: 1
Command: prebuild-install || npm run build-release
Arguments: 
Directory: /Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3
Output:
prebuild-install WARN install No prebuilt binaries found (target=16.14.2 runtime=node arch=arm64 libc= platform=darwin)

> better-sqlite3@7.4.6 build-release
> node-gyp rebuild --release

gyp info it worked if it ends with ok
gyp info using node-gyp@9.0.0
gyp info using node@16.14.2 | darwin | arm64
gyp info find Python using Python version 3.8.9 found at "/Applications/Xcode.app/Contents/Developer/usr/bin/python3"
gyp info spawn /Applications/Xcode.app/Contents/Developer/usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/Users/kendrawing/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/kendrawing/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/kendrawing/Library/Caches/node-gyp/16.14.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/kendrawing/Library/Caches/node-gyp/16.14.2',
gyp info spawn args   '-Dnode_gyp_dir=/Users/kendrawing/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/kendrawing/Library/Caches/node-gyp/16.14.2/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  TOUCH b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
  ACTION deps_sqlite3_gyp_locate_sqlite3_target_extract_sqlite3 b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
/bin/sh: Practice/Strapi: No such file or directory
/Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3/deps/extract.js:8
process.on('unhandledRejection', (err) => { throw err; });
                                            ^

CwdError: ENOENT: Cannot cd into '/Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3'
    at /Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/tar/lib/mkdir.js:43:12
    at FSReqCallback.oncomplete (node:fs:198:21) {
  path: '/Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3',
  code: 'ENOENT'
}
make: *** [b857c92884e9598d609f6be182a2595df7a8e00f.intermediate] Error 1
rm b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/kendrawing/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:526:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 21.4.0
gyp ERR! command "/Users/kendrawing/.nvm/versions/node/v16.14.2/bin/node" "/Users/kendrawing/node_modules/.bin/node-gyp" "rebuild" "--release"
gyp ERR! cwd /Users/kendrawing/Documents/Coding/4 Practice/Strapi Stuff/forumquestion/my-project/node_modules/better-sqlite3

// package.json

{
  "name": "my-project",
  "private": true,
  "version": "0.1.0",
  "description": "A Strapi application",
  "scripts": {
    "develop": "strapi develop",
    "start": "strapi start",
    "build": "strapi build",
    "strapi": "strapi"
  },
  "devDependencies": {},
  "dependencies": {
    "@strapi/strapi": "4.1.8",
    "@strapi/plugin-users-permissions": "4.1.8",
    "@strapi/plugin-i18n": "4.1.8",
    "better-sqlite3": "7.4.6"
  },
  "author": {
    "name": "A Strapi developer"
  },
  "strapi": {
    "uuid": "7d43367c-29d9-411a-abc7-7cd4a7421c1d"
  },
  "engines": {
    "node": ">=12.x.x <=16.x.x",
    "npm": ">=6.0.0"
  },
  "license": "MIT"
}
```

Most likely you are like me and your internet is not very strong. You can increase the timeout for node eg on linux run this command
cat timeout 600000 > ~/.npmrc

Then try to setup strapi again.

I’m on a mac but I tried running this command in my terminal-

➜  ~ cat timeout 600000 > ~/.npmrc
cat: timeout: No such file or directory
cat: 600000: No such file or directory

?

➜  ~ cd ~/.npmrc
cd: not a directory: /Users/kendrawing/.npmrc

The idea is to create a text file named .npmrc in your home directory with the content timeout 6000000
However I found a better way. Read this article

Also, some guys have reported issues with nodejs on mac M1. If you are using M1 try installing nodejs 14 and see if that helps

hello i just also came across this problem while creating strapi app using this method(npx create-strapi-app@latest my-project --quickstart) then after hours of search i have came across to this solution that is: after using the above method, while it complains saying ‘error while installing dependencies…’ fto solve and get running with strapi install yarn(npm install yarn -g) then after finish type ‘yarn develop’ after this it should show up a new screen of ur browser to login to your strapi dashboard, congra!!, share this if it helps you, lets the coding community gets better and smarter.

Hi, I had the same problem and I searched for its solution more than two days and I finally found. My problem was with node version on my machine because I already have installed the latest version of node (18) than I noticed that this version is not supported by strapi and I have to install node (16 or 14.) Then when I installed node (16) and setup strapi again everything surprisingly worked fine. I hope you solve your problem too

1 Like