Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot convert undefined or null to object #26

Closed
BeatKO opened this issue Jan 5, 2022 · 4 comments
Closed

Cannot convert undefined or null to object #26

BeatKO opened this issue Jan 5, 2022 · 4 comments

Comments

@BeatKO
Copy link

BeatKO commented Jan 5, 2022

When running
node utils/nftport/genericMetas.js

i get this error:

delete jsonFile.custom_fields.dna;
^
TypeError: Cannot convert undefined or null to object

@codeSTACKr
Copy link
Owner

does your json files not have the dna field?

@BeatKO
Copy link
Author

BeatKO commented Jan 6, 2022

it has.

"name": "test #2",
"description": "Unique test test",
"image": "ipfs://NewUriToReplace/2.png",
"dna": "testnumber",
"edition": 2,
"date": 1641415744625,
"attributes": [

@BeatKO
Copy link
Author

BeatKO commented Jan 6, 2022

So it worked for me when i changed this line:

delete jsonFile.custom_fields.dna;
to this:
delete jsonFile.dna;

@codeSTACKr
Copy link
Owner

yeah, your json file is not formatted the way it's looking for. So this wouldn't be an issue with the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants