V2 (Code generative art Update 3 on YT) "Path" undefined
See original GitHub issueI’m getting an issue when trying to run the program. I followed along on the YouTube video “Code generative art UPDATE3” Also did update 1 and update 2.
I don’t want/need to go any further than v2 as it works with the rarities I need for my collection.
When I run the “node index.js” I get the following error:
1 super_rare [] (node:16916) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘path’ of undefined
I’m assuming the issue is in the “const LoadLayerImag” section but I can’t see whats wrong with it. I have even copied the code straight from github for V2 and I still get the error. Below is what I have:
const loadLayerImg = async (_layer) => {
return new Promise(async (resolve) => {
const image = await loadImage(`${_layer.selectedElement.path}`);
resolve({ layer: _layer, loadedImage: image });
});
};
I’m not sure what I missed. Is this referencing back to something else?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Issues · HashLips/generative-art-node - GitHub
Create generative art by using the canvas api and node js - Issues ... Error codes when uploading Files to IFPS via nftport/node-js/VScode....
Read more >Newest 'undefined' Questions - Page 8 - Stack Overflow
Best way to handle Undefined array key in PHP 8.0 [closed] ... DESKTOP-1K26KAH\Desktop\generative-art-opensource-3> node index.js C:\Users\mi pc.
Read more >zNI - River Thames Conditions - Environment Agency - GOV.UK
1 2 3-trimethylpropane correct name, Marika vuoriheimo. ... War of change sword art online, Mabusa buff, Hit des clubs 1997, Happy diwali firework...
Read more >(PDF) Digitizing the Txalaparta: Computer-Based Study of a ...
Computer Music Journal, 43:2/3, pp. ... environment to the one of art, cultural activism, ... generative in any way, however, consisting only of....
Read more >Untitled
Long way round 5-3, Sigaret vervanger kopen, Panos vitzilaios facebook, Lik oum guitar, ... Cjsoi 2010 football, Torchlight 2 update 13 mod launcher...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The ‘path’ issue above happens when you have a sub folder with no images - for example no images in one of the folders for super_rare. I made sure there were images in each folder and it worked fine. It’s a little odd if you don’t want any super_rare options for one layer. I (Not so great) workaround might be to put a transparent PNG in those folders. I hope @HashLips has a better solution for this.
its not working from my side, i get
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'path' of undefined