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.21k stars 4.3k forks source link

Error: Cannot find module. node indek.js doestn work #776

Open Abagusd opened 2 years ago

Abagusd commented 2 years ago

Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\BAGUS\Documents\zz NFT\Software\hashlips_art_engine-1.1.2_patch_v5\hashlips_art_engine-1.1.2_patch_v5> npm install npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile added 65 packages, and audited 66 packages in 59s

6 packages are looking for funding run npm fund for details

5 vulnerabilities (3 moderate, 2 high)

To address all issues, run:

Run npm audit for details. PS C:\Users\BAGUS\Documents\zz NFT\Software\hashlips_art_engine-1.1.2_patch_v5\hashlips_art_engine-1.1.2_patch_v5> npm fund hashlips_art_engine@1.1.1 ├── https://github.com/sponsors/sindresorhus │ └── make-dir@3.1.0, mimic-response@2.1.0 ├── https://github.com/sponsors/isaacs │ └── rimraf@3.0.2, glob@7.2.0 └── https://github.com/sponsors/feross └── safe-buffer@5.2.1, simple-concat@1.0.1

PS C:\Users\BAGUS\Documents\zz NFT\Software\hashlips_art_engine-1.1.2_patch_v5\hashlips_art_engine-1.1.2_patch_v5> npm audit fix

changed 2 packages, and audited 66 packages in 2s

6 packages are looking for funding run npm fund for details

npm audit report

ansi-regex >2.1.1 <5.0.1 Severity: moderate Inefficient Regular Expression Complexity in chalk/ansi-regex - https://github.com/advisories/GHSA-93q8-gq69-wqmw fix available via npm audit fix strip-ansi 4.0.0 - 5.2.0 Depends on vulnerable versions of ansi-regex node_modules/strip-ansi string-width 2.1.0 - 4.1.0 Depends on vulnerable versions of strip-ansi node_modules/string-width

3 moderate severity vulnerabilities

To address all issues, run: npm audit fix PS C:\Users\BAGUS\Documents\zz NFT\Software\hashlips_art_engine-1.1.2_patch_v5\hashlips_art_engine-1.1.2_patch_v5> npm audit fix

up to date, audited 66 packages in 2s

6 packages are looking for funding run npm fund for details

npm audit report

ansi-regex >2.1.1 <5.0.1 Severity: moderate Inefficient Regular Expression Complexity in chalk/ansi-regex - https://github.com/advisories/GHSA-93q8-gq69-wqmw fix available via npm audit fix strip-ansi 4.0.0 - 5.2.0 Depends on vulnerable versions of ansi-regex node_modules/strip-ansi string-width 2.1.0 - 4.1.0 node_modules/string-width

3 moderate severity vulnerabilities

npm audit fix PS C:\Users\BAGUS\Documents\zz NFT\Software\hashlips_art_engine-1.1.2_patch_v5\hashlips_art_engine-1.1.2_patch_v5> npm uninstall canvas

removed 61 packages, and audited 5 packages in 1s

found 0 vulnerabilities PS C:\Users\BAGUS\Documents\zz NFT\Software\hashlips_art_engine-1.1.2_patch_v5\hashlips_art_engine-1.1.2_patch_v5> npm install

up to date, audited 5 packages in 2s

found 0 vulnerabilities PS C:\Users\BAGUS\Documents\zz NFT\Software\hashlips_art_engine-1.1.2_patch_v5\hashlips_art_engine-1.1.2_patch_v5> node index.js node:internal/modules/cjs/loader:936 throw err; ^

Error: Cannot find module 'C:\Users\BAGUS\Documents\zz NFT\Software\hashlips_art_engine-1.1.2_patch_v5\hashlips_art_engine-1.1.2_patch_v5/node_modules/canvas'
Require stack:

bolshoytoster commented 2 years ago

@Abagusd you culd try deleting the node_modules folder then running npm install again (you don't need to npm audit fix).

xrhytm commented 1 year ago

pls help me

PS C:\Users\ahmet\OneDrive\Masaüstü\hashlips_art_engine-1.1.1_update> npm install

up to date, audited 66 packages in 468ms

6 packages are looking for funding run npm fund for details

found 0 vulnerabilities PS C:\Users\ahmet\OneDrive\Masaüstü\hashlips_art_engine-1.1.1_update>

bolshoytoster commented 1 year ago

@xrhytm you can run npm run generate or node index.js now.

xrhytm commented 1 year ago

@bolshoytoster okey next

Error: ENOENT, No such file or directory 'C:\Users\ahmet\OneDrive\Masaüstü\hashlips_art_engine-1.1.2_patch_v1/layers/Background/Black#1.png' at setSource (C:\Users\ahmet\OneDrive\Masaüstü\hashlips_art_engine-1.1.2_patch_v1\node_modules\canvas\lib\image.js:94:13) at Image.set (C:\Users\ahmet\OneDrive\Masaüstü\hashlips_art_engine-1.1.2_patch_v1\node_modules\canvas\lib\image.js:65:9) at C:\Users\ahmet\OneDrive\Masaüstü\hashlips_art_engine-1.1.2_patch_v1\node_modules\canvas\index.js:34:15 at new Promise () at loadImage (C:\Users\ahmet\OneDrive\Masaüstü\hashlips_art_engine-1.1.2_patch_v1\node_modules\canvas\index.js:23:10) at C:\Users\ahmet\OneDrive\Masaüstü\hashlips_art_engine-1.1.2_patch_v1\src\main.js:181:25 at new Promise () at loadLayerImg (C:\Users\ahmet\OneDrive\Masaüstü\hashlips_art_engine-1.1.2_patch_v1\src\main.js:180:10) at C:\Users\ahmet\OneDrive\Masaüstü\hashlips_art_engine-1.1.2_patch_v1\src\main.js:361:31 at Array.forEach () { errno: 2, code: 'ENOENT', path: 'C:\Users\ahmet\OneDrive\Masaüstü\hashlips_art_engine-1.1.2_patch_v1/layers/Background/Black#1.png', syscall: 'fopen' }

Node.js v18.16.0

bolshoytoster commented 1 year ago

@xrhytm due to a bug with canvas, you can't have non-unicode characters in a path on windows.

You could try moving hashlips to somewhere like C:/Users/Public/.

xrhytm commented 1 year ago

@bolshoytoster

S C:\Users\Public\hashlips_art_engine-1.1.2_patch_v1> npm run generate

hashlips_art_engine@1.1.1 generate node index.js

(node:20740) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead (Use node --trace-deprecation ... to show where the warning was created) Created edition: 1, with DNA: f9f3d7dfe1bfa73c0b091af41fad582b27d61519 Created edition: 2, with DNA: 2abb6e1ed4982f9462466fd4b50c113cce65dcd0 Created edition: 3, with DNA: f795dbbebbe18288e2db37c0dcf21e202823d597 Created edition: 4, with DNA: 8aac49dd74e03342d462bd9052cd5be1aeedc6a9 Created edition: 5, with DNA: f6decd3758fec287ebba5cda110e0f50afacd3d1 PS C:\Users\Public\hashlips_art_engine-1.1.2_patch_v1> node index.js (node:14656) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead (Use node --trace-deprecation ... to show where the warning was created) Created edition: 1, with DNA: 2abb6e1ed4982f9462466fd4b50c113cce65dcd0 Created edition: 2, with DNA: c637736f9bb80fccf2720c35a2c65ecab7b09afa Created edition: 3, with DNA: 9bbb5b6b181ea759599177d7b0416de3c1c6dddd Created edition: 4, with DNA: b3b18c82a722c7b67d7f0417ef03459bfb2857c3 Created edition: 5, with DNA: 3654d13c1440bde98231d526c0d4b7b3290cd36e PS C:\Users\Public\hashlips_art_engine-1.1.2_patch_v1> npm install

up to date, audited 66 packages in 744ms

6 packages are looking for funding run npm fund for details

found 0 vulnerabilities

xrhytm commented 1 year ago

PS C:\Users\Public\hashlips_art_engine-1.1.2_patch_v1> node --trace-deprecation ... node:internal/modules/cjs/loader:1078 throw err; ^

Error: Cannot find module 'C:\Users\Public\hashlips_art_engine-1.1.2_patch_v1...' at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15) at Module._load (node:internal/modules/cjs/loader:920:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }

bolshoytoster commented 1 year ago

@xrhytm you've just generated 5 images, they should be in build/images/.

xrhytm commented 1 year ago

@xrhytm you've just generated 5 images, they should be in build/images/.

THANKS MAN 🙌🙌