HashLips / hashlips_art_engine

HashLips Art Engine is a tool used to create multiple different instances of artworks based on provided layers.
MIT License
7.18k stars 4.3k forks source link

npm run geneate not working and I already use node v14.18.2. How I fix this? #1388

Open Rheyner opened 2 years ago

Rheyner commented 2 years ago

This is the code when I put npm run generate after the npm install

hashlips_art_engine@1.1.1 generate C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine node index.js

(node:16896) UnhandledPromiseRejectionWarning: Error: out of memory at setSource (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\lib\image.js:94:13) at Image.set (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\lib\image.js:65:9)
at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\index.js:34:15 at new Promise () at loadImage (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\index.js:23:10)
at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:185:27 at new Promise () at loadLayerImg (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:184:12) at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:368:31 at Array.forEach () (Use node --trace-warnings ... to show where the warning was created) (node:16896) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 7) (node:16896) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:16896) UnhandledPromiseRejectionWarning: Error: out of memory at setSource (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\lib\image.js:94:13) at Image.set (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\lib\image.js:65:9)
at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\index.js:34:15 at new Promise () at loadImage (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\index.js:23:10)
at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:185:27 at new Promise () at loadLayerImg (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:184:12) at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:368:31 at Array.forEach () (node:16896) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 8) (node:16896) UnhandledPromiseRejectionWarning: Error: out of memory at setSource (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\lib\image.js:94:13) at Image.set (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\lib\image.js:65:9)
at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\index.js:34:15 at new Promise () at loadImage (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\index.js:23:10)
at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:185:27 at new Promise () at loadLayerImg (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:184:12) at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:368:31 at Array.forEach () (node:16896) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 9) (node:16896) UnhandledPromiseRejectionWarning: Error: out of memory at setSource (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\lib\image.js:94:13) at Image.set (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\lib\image.js:65:9)
at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\index.js:34:15 at new Promise () at loadImage (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\index.js:23:10)
at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:185:27 at new Promise () at loadLayerImg (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:184:12) at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:368:31 at Array.forEach () (node:16896) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 10) (node:16896) UnhandledPromiseRejectionWarning: Error: out of memory at setSource (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\lib\image.js:94:13) at Image.set (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\lib\image.js:65:9)
at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\index.js:34:15 at new Promise () at loadImage (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\index.js:23:10)
at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:185:27 at new Promise () at loadLayerImg (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:184:12) at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:368:31 at Array.forEach () (node:16896) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 11) (node:16896) UnhandledPromiseRejectionWarning: Error: out of memory at setSource (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\lib\image.js:94:13) at Image.set (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\lib\image.js:65:9)
at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\index.js:34:15 at new Promise () at loadImage (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\node_modules\canvas\index.js:23:10)
at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:185:27 at new Promise () at loadLayerImg (C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:184:12) at C:\Users\LENOVO\Documents\GitHub\hashlips_art_engine\src\main.js:368:31 at Array.forEach () (node:16896) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 12)

bolshoytoster commented 2 years ago

@Rheyner the error is nothing to do with your node version, it says Error: out of memory.

Try using my fork, it uses less memory if you don't have enough.

Amanade32 commented 2 years ago

hey buddy @bolshoytoster what does it mean?? what am i doing wrong? zsh: command not found: nvm amanade@Amans-MBP hashlips_art_engine-main % npm install npm WARN hashlips_art_engine@1.1.1 No repository field.

audited 66 packages in 0.796s

6 packages are looking for funding run npm fund for details

found 0 vulnerabilities

amanade@Amans-MBP hashlips_art_engine-main % npm run generate

hashlips_art_engine@1.1.1 generate /Users/amanade/Downloads/hashlips_art_engine-main node index.js

layers/Eyeball doesn't exist, make sure your layers/ folder matches your src/config.js amanade@Amans-MBP hashlips_art_engine-main % it says even if i match both the exact same. is it because i'm using m1?

bolshoytoster commented 2 years ago

@Amanade32 make sure you've copied over your src/config.js and that it's definetely saved.

Amanade32 commented 2 years ago

thanks alot mate @bolshoytoster i didn't saved that's why it was showing issues.