imgly / background-removal-js

Remove backgrounds from images directly in the browser environment with ease and no additional costs or privacy concerns. Explore an interactive demo.
https://img.ly/showcases/cesdk/web/background-removal/web
GNU Affero General Public License v3.0
5.49k stars 339 forks source link

Compatibility Issue: @imgly/background-removal with Node.js v20.11.1 #119

Closed black-turtle closed 1 month ago

black-turtle commented 1 month ago

Hello Guys, I'm trying to install the @imgly/background-removal package (version 1.5.0) using npm install @imgly/background-removal. However, I'm encountering an error message indicating a potential compatibility issue with my current Node.js version.

Error Message:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@imgly/background-removal@1.5.0',
npm WARN EBADENGINE   required: { node: '=20.0.0' },
npm WARN EBADENGINE   current: { node: 'v20.11.1', npm: '10.2.4' }
npm WARN EBADENGINE }

My Environment:

According to the error message, it seems the @imgly/background-removal package requires Node.js version 20.0.0 exactly. Could you please clarify if this is indeed the case or if the package might be compatible with newer Node.js versions like mine (v20.11.1)? If there's any documentation or compatibility information available, it would be very helpful.

pinksLi commented 1 month ago

Me too Request help

Hello Guys, I'm trying to install the @imgly/background-removal package (version 1.5.0) using npm install @imgly/background-removal. However, I'm encountering an error message indicating a potential compatibility issue with my current Node.js version.

去除背景依赖的node版本2
pinksLi commented 1 month ago

Solution Use the following methods

import { removeBackground } from "@imgly/background-removal" let firstImg = ref() let lastImg = ref() function removeImgBack() { removeBackground(firstImg.value, {}).then((blob) => { lastImg.value = URL.createObjectURL(blob) }) }

DanielHauschildt commented 1 month ago

Good catch. I will fix the engine requirements and publish a new version asap

DanielHauschildt commented 1 month ago

Should be fixed with 1.5.1 which was just published.