question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

V2 (Code generative art Update 3 on YT) "Path" undefined

See original GitHub issue

I’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:open
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
mixartcommented, Sep 6, 2021

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.

0reactions
gonzaloperincommented, Sep 16, 2021

its not working from my side, i get UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'path' of undefined

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found