Josh-McFarlin / remix-image

A React component for responsive images in Remix
https://remix-image.mcfarl.in
MIT License
329 stars 24 forks source link

Library not working on Vercel #82

Closed Loschcode closed 6 months ago

Loschcode commented 6 months ago

Describe the bug

When trying to push the installation without anything more it crashes on Vercel

.../node_modules/better-sqlite3 install: ./src/util/macros.lzz:157:21: error: 'v8::AccessorSignature' has not been declared
.../node_modules/better-sqlite3 install: ./src/util/binder.lzz: In static member function 'static bool Binder::IsPlainObject(v8::Isolate*, v8::Local<v8::Object>)':
.../node_modules/better-sqlite3 install: ./src/util/binder.lzz:37:51: error: 'class v8::Object' has no member named 'CreationContext'; did you mean 'GetCreationContext'?
.../node_modules/better-sqlite3 install: ./src/util/data.lzz:77:175: note: here
.../node_modules/better-sqlite3 install: make: *** [better_sqlite3.target.mk:120: Release/obj.target/better_sqlite3/src/better_sqlite3.o] Error 1
.../node_modules/better-sqlite3 install: rm ba23eeee118cd63e16015df367567cb043fed872.intermediate
.../node_modules/better-sqlite3 install: make: Leaving directory '/vercel/path0/node_modules/.pnpm/better-sqlite3@7.6.2/node_modules/better-sqlite3/build'
.../node_modules/better-sqlite3 install: gyp ERR! build error 
.../node_modules/better-sqlite3 install: gyp ERR! stack Error: `make` failed with exit code: 2
 ELIFECYCLE  Command failed with exit code 1.
Error: Command "pnpm install" exited with 1

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

You just have to install it and push it to production with Vercel.

Expected behavior

No crash

Screenshots or Videos

No response

Platform

Unsure

Additional context

No response

Loschcode commented 6 months ago

After investigating quite a lot I could make it work by removing this part of the package.json

"engines": {
  "node": ">=18.0.0"
}