New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnhandledPromiseRejectionWarning: Error: ENOENT, No such file or directory 'undefined' 馃攳馃攳馃攳馃攳馃攳馃攳馃攳馃攳 #102
Comments
config.js
// adds a rarity to the configuration. This is expected to correspond with a directory containing the rarity for each defined layer // get the name without last 4 characters -> slice .png from the name // reads the filenames of a given folder and returns it with its name and path // adds a layer to the configuration. The layer will hold information on all the defined parts and
}); let elementsForLayer = { // adds layer-specific percentages to use one vs another rarity /**************************************************************
// image width in pixels // create required weights // create required layers // provide any specific percentages that are required for a given layer and rarity level module.exports = { |
index.js
// adds a rarity to the configuration. This is expected to correspond with a directory containing the rarity for each defined layer // get the name without last 4 characters -> slice .png from the name // reads the filenames of a given folder and returns it with its name and path // adds a layer to the configuration. The layer will hold information on all the defined parts and
}); let elementsForLayer = { // adds layer-specific percentages to use one vs another rarity /**************************************************************
// image width in pixels // create required weights // create required layers // provide any specific percentages that are required for a given layer and rarity level module.exports = { |
same issue |
I have ran npm install canvas and still same error. Is this possibly a rarity config issue? Do i need to add super_rare, rare, & original to every single layer. I have 12 so would the total be 36 lines of code. 3 rarity types for all 12 layers? |
Also I've went through all of the closed tickets and applied everything I learned and still same error. Please advise. |
Do i need to rename the actual image layer file name to something specific? |
Try putting layer files name like this layer1_folder > layer1.png |
Im so close! Please review & tell me where im going wrong.
Repo appears updated since last Tutorial video. Looks like its starting to mint, gives it a DNA and then is looking for the image in the wrong directory. How can i correct this? All layers are in folders in the input folder. /input/Backgrounds/super_rare ect.
Thank you
creating NFT 1 of 10
(node:12892) UnhandledPromiseRejectionWarning: Error: ENOENT, No such file or directory 'undefined'
at setSource (C:\Users\Morpheus360\generative-art-opensource-main\node_modules\canvas\lib\image.js:91:13)
at Image.set (C:\Users\Morpheus360\generative-art-opensource-main\node_modules\canvas\lib\image.js:62:9)
at C:\Users\Morpheus360\generative-art-opensource-main\node_modules\canvas\index.js:34:15
at new Promise ()
at loadImage (C:\Users\Morpheus360\generative-art-opensource-main\node_modules\canvas\index.js:23:10)
at C:\Users\Morpheus360\generative-art-opensource-main\index.js:75:25
at new Promise ()
at loadLayerImg (C:\Users\Morpheus360\generative-art-opensource-main\index.js:74:10)
at C:\Users\Morpheus360\generative-art-opensource-main\index.js:215:27
at Array.forEach ()
(Use
node --trace-warnings ...
to show where the warning was created)(node:12892) 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: 2)(node:12892) [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.
PS C:\Users\Morpheus360\generative-art-opensource-main>
The text was updated successfully, but these errors were encountered: