npm i flowbite-react gets failed

102 views Asked by At

I'm trying to install flowbite-react to a MERN project. I followed the steps from https://www.flowbite-react.com/docs/getting-started/introduction

Here when running npm i flowbite-react . it gets failed. error log as follows:

npm WARN deprecated [email protected]: Removed event-stream from gulp-header
npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm ERR! code 1
npm ERR! path /home/kavin/JSProjects/MERNAuth/frontend/node_modules/flowbite-react/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.5/libvips-8.14.5-linux-x64.tar.br
npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
npm ERR! sharp: Installation error: aborted

npm ERR! A complete log of this run can be found in: /home/kavin/.npm/_logs/2024-02-29T13_23_10_397Z-debug-0.log

mentioned debug log:

3810 timing build:link:node_modules/which Completed in 9ms 3811 timing build:link Completed in 12ms 3812 info run [email protected] install node_modules/flowbite-react/node_modules/sharp (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy) 3813 info run [email protected] install { code: 1, signal: null } 3814 timing reify:rollback:createSparse Completed in 1731ms 3815 timing reify:rollback:retireShallow Completed in 38ms 3816 timing command:i Completed in 665211ms 3817 verbose stack Error: command failed 3817 verbose stack at ChildProcess.<anonymous> (/home/kavin/.nvm/versions/node/v20.11.1/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27) 3817 verbose stack at ChildProcess.emit (node:events:518:28) 3817 verbose stack at maybeClose (node:internal/child_process:1105:16) 3817 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:305:5) 3818 verbose pkgid [email protected] 3819 verbose cwd /home/kavin/JSProjects/MERNAuth/frontend 3820 verbose Linux 5.15.0-46-generic 3821 verbose node v20.11.1 3822 verbose npm v10.5.0 3823 error code 1 3824 error path /home/kavin/JSProjects/MERNAuth/frontend/node_modules/flowbite-react/node_modules/sharp 3825 error command failed 3826 error command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy) 3827 error sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.5/libvips-8.14.5-linux-x64.tar.br 3827 error sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies 3828 error sharp: Installation error: aborted 3829 verbose exit 1 3830 timing npm Completed in 665385ms 3831 verbose unfinished npm timer reify 1709212990571 3832 verbose unfinished npm timer reify:build 1709213555770 3833 verbose unfinished npm timer build 1709213555771 3834 verbose unfinished npm timer build:deps 1709213555772 3835 verbose unfinished npm timer build:run:install 1709213555807 3836 verbose unfinished npm timer build:run:install:node_modules/flowbite-react/node_modules/sharp 1709213555808 3837 verbose code 1 3838 error A complete log of this run can be found in: /home/kavin/.npm/_logs/2024-02-29T13_23_10_397Z-debug-0.log

Tried the following:

  1. updated npm. Have the latest npm npm install -g npm
  2. tried increasing time limit for the npm call NODE_NETWORK_TIMEOUT=600 npm install flowbite-react
  3. tried clearing npm cache clean and installing it again
  4. tried installing unsafe perm
0

There are 0 answers