skip to Main Content

npx create-strapi-app my-project --quickstart
I am executing this command and it is trying to download certain libraries from github using npm. Due to security reasons the servers are not allowed access to github, so it is not able to download libraries like libvips. Is there any other way to setup a strapi project so that it could get libraries from any other source ?
Here’s the error snippet

npx: installed 91 in 18.847s
Creating a new Strapi application at /home/centos/my-project.

Creating a quickstart project.
Creating files.
Error while installing dependencies:
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: This module has moved and is now available at @hapi/boom. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated @formatjs/[email protected]: We have renamed the package to @formatjs/intl-numberformat
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated [email protected]: This project is unmaintained
npm WARN deprecated [email protected]: This project is unmaintained
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
info sharp Downloading http://10.157.194.58/sharp/v8.10.0/libvips-8.10.0-linux-x64.tar.br
ERR! sharp tunneling socket could not be established, statusCode=403
info sharp Attempting to build from source via node-gyp but this may fail due to the above error
info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
../src/common.cc:24:22: fatal error: vips/vips8: No such file or directory
#include <vips/vips8>
                      ^
compilation terminated.
make: *** [Release/obj.target/sharp/src/common.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/centos/node-v12.18.4-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 3.10.0-1127.18.2.el7.x86_64
gyp ERR! command "/home/centos/node-v12.18.4-linux-x64/bin/node" "/home/centos/node-v12.18.4-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/centos/my-project/node_modules/sharp
gyp ERR! node -v v12.18.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"<8.10.0"} (current: {"node":"12.18.4","npm":"6.14.6"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] requires a peer of knex@^0.20.0 but none is installed. You must install peer dependencies yourself.
npm WARN @buffetjs/[email protected] requires a peer of yup@^0.27.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/centos/.npm/_logs/2020-10-09T11_07_28_305Z-debug.log

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 mentionned in the installation errors and try to run the following command:

cd /home/centos/my-project && npm install

6

Answers


  1. I had the same problem, try here:
    https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md#Solutions

    After, that still had problem with installation and deleted .npm/_libvips/libvips-8.10.0-darwin-x64.tar.br file and installed npx create-strapi-app my-project --quickstart everything was ok

    Login or Signup to reply.
  2. This helps for me.

    Open MAC terminal and use these commands:

    1. npm cache clean --force
    2. npx create-strapi-app
    3. npm i
    4. npm run develop
    Login or Signup to reply.
  3. i have problem in installing dependencies
    my operation system is windows 11
    tested with node v14 and v16
    tested with npm v6 and v8
    tested with yarn npx and npm
    no one working
    i just stuck in line bellow for hours

    warning "@strapi/strapi > @strapi/admin > webpack-dev-server > [email protected]" has unmet peer dependency "@types/express@^4.17.13".
    warning "@strapi/plugin-users-permissions > [email protected]" has unmet peer dependency "koa@>=2.0.0". 
    warning Workspaces can only be enabled in private projects.
    [5/5] Building fresh packages...
    [-/9] ⠠ waiting...
    [-/9] ⠠ waiting...
    [-/9] ⠠ waiting...
    [4/9] ⠠ sharp
    [-/9] ⠐ waiting...
    
    Login or Signup to reply.
  4. What worked for me was as simple as adding a yarn.lock file to the root of your project and running yarn install and finally run yarn start, your project should start successfully

    Login or Signup to reply.
  5. I know the thread is pretty old but I came across the same issue while trying to install Strapi on a Windows 10 local development enviroment using MySQL Database through npm, even though some of the posted answers in this thread helped me to get a better understanding of the issue for my specific case the solution was as follow:

    In phpMyAdmin

    1. Create a new MySQL DB Schema and user for the project, this will be the Database and User to be entered during the npx installation process

    In Windows PowerShell (as admin)

    1. npx create-strapi-app@latest my-project
    2. cd my-project
    3. npm install
    4. npm run develop

    These are the npm, node and MySQL version I used to install Strapi locally:

    • npm Vers. 6.14.17 check your version using npm -v
    • node.js Vers. 14.20.0 check your version using node -v
    • MySQL Vers. 10.4.24-MariaDB

    Strapi should run by defult at http://localhost:1337/admin

    To change the port it would be needed to edit the .env file at your project root directory.

    Login or Signup to reply.
  6. I was having similar issues, tried a bunch of stuff. Ran this code in the terminal and it solved all of my issues:

    sudo apt-get install build-essential apt-transport-https lsb-release ca-certificates curl -y
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search