create-10k-nft-collection icon indicating copy to clipboard operation
create-10k-nft-collection copied to clipboard

[Bug]: Node 17500 UnhandledPromiseRejectionWarning

Open jon-troupe opened this issue 3 years ago • 3 comments

Version

  • [X] Yes

General Question

  • [X] No

What happened?

After multiple correct workings, and no issues running the code for a few attempts at varying different tests I eventually get this error : (node:1020) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'path' of undefined at C:\Users\Jonathan\Desktop\Programming\NFT creator\create-10k-nft-collection-1.1.0\src\main.js:183:61 at new Promise () at loadLayerImg (C:\Users\Jonathan\Desktop\Programming\NFT creator\create-10k-nft-collection-1.1.0\src\main.js:182:10) at C:\Users\Jonathan\Desktop\Programming\NFT creator\create-10k-nft-collection-1.1.0\src\main.js:363:31 at startCreating (C:\Users\Jonathan\Desktop\Programming\NFT creator\create-10k-nft-collection-1.1.0\src\main.js:362:17) at C:\Users\Jonathan\Desktop\Programming\NFT creator\create-10k-nft-collection-1.1.0\index.js:6:3 at Object. (C:\Users\Jonathan\Desktop\Programming\NFT creator\create-10k-nft-collection-1.1.0\index.js:7:3) at Module._compile (internal/modules/cjs/loader.js:1072:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10) (Use node --trace-warnings ... to show where the warning was created) (node:1020) 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: 1) (node:1020) [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.

I am not too sure what's going on, my best guess is I'm getting one error that's causing a shut down? something about deprecated code perhaps killing the entire process because of the strictness? Any suggestions as to what I can try?

What have you tried?

Nothing too in depth outside of trying and failing at changing the strictness but deciding against it later.

Relevant log output

No response

Protect your information

  • [X] I Agree

jon-troupe avatar Jan 31 '22 06:01 jon-troupe

I had a similar issue myself. Check all the file names and make sure there aren’t any dashes in the names. That sorted it for me. Hope that helps.

DoodlerPete avatar Jan 31 '22 07:01 DoodlerPete

Hmm, thanks for hte tip but it seems to have not remedied the issue. There were # symbols in them so I got rid of them, though.

jon-troupe avatar Jan 31 '22 07:01 jon-troupe

The # symbols are ok. Remove any other symbols from the layer folder and file names. Also, double-check that the config.js layers match in spelling and capitalization to your layer folder names.

codeSTACKr avatar Feb 02 '22 16:02 codeSTACKr