themesberg / flowbite-react

Official React components built for Flowbite and Tailwind CSS
https://flowbite-react.com
MIT License
1.77k stars 395 forks source link

npm deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) #1288

Open prathabanKavin opened 4 months ago

prathabanKavin commented 4 months ago

Steps to reproduce

  1. Try installing npm i flowbite-react
  2. Followed the steps in 'https://www.flowbite-react.com/docs/getting-started/introduction'

Current behavior

flowbite-react is not getting installed.

Context

Here is the error log: npm WARN deprecated gulp-header@1.8.12: Removed event-stream from gulp-header npm WARN deprecated coffee-script@1.12.7: 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

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
SutuSebastian commented 4 months ago

Known issue, this will go away as soon as we remove sharp from devDependencies.

prathabanKavin commented 4 months ago

@SutuSebastian dependency tree shows a like flowbite-react@0.7.2 <- markdown-toc@1.2.0 <- gray-matter@2.1.1 <- coffee-script@1.12.7

gray-matter here is bit older version from 2017. This issue is fixed on their end https://github.com/jonschlinkert/gray-matter/pull/57. Seems there is need for gray-matter version bump here.

prathabanKavin commented 4 months ago

Is there a way i can use flowbite-react until this gets fixed?

SutuSebastian commented 4 months ago

It looks like its failing because of sharp, the coffee-script is just a npm WARN.

Can u try: npm install --no-optional?