Open ghost opened 2 years ago
@Erlhyenaplays it looks like something is wrong with the /build/json/_metadata.json
file. Could you paste the contents of that here?
@Erlhyenaplays I have no idea how it happened, but you could fix it by changing line 17 of utils/update_info.js
from data.forEach((item) => {
to data.collection.forEach((item) => {
.
@Erlhyenaplays I have no idea how it happened, but you could fix it by changing line 17 of
utils/update_info.js
fromdata.forEach((item) => {
todata.collection.forEach((item) => {
.
its still not working for me. its just showing this
TypeError: Cannot read properties of undefined (reading 'forEach')
at Object.
@0xitsHimanshu can you paste one of your json files please.
Having this same issue.
@Las499 can you paste one of your metadata files please.
{ "name": "GrimCat #1", "description": "A cute, grumpy GrimCat! Unique and ready for a new home!", "file_url": "ipfs://NewUriToReplace/1.png", "custom_fields": { "dna": "dcee29c44db1ff3b85ba83ab5d104220738cae62", "edition": 1, "date": 1646532832718, "compiler": "HashLips Art Engine" }, "external_url": "https://lefluffy.com/nfts", "attributes": [ { "trait_type": "Background", "value": "Yellow" }, { "trait_type": "Tail Color", "value": "Tail6" }, { "trait_type": "Tail Accessory", "value": "devil 4" }, { "trait_type": "Shirt Base Color", "value": "shirtbase1" }, { "trait_type": "Shirt Pattern", "value": "pattern 12" }, { "trait_type": "Arm Outer", "value": "arm" }, { "trait_type": "Hoodie Hood Color", "value": "Hoodie Color 4" }, { "trait_type": "Hoodie Accent Color", "value": "Hoodie Outline 2" }, { "trait_type": "Ears", "value": "inner ears" }, { "trait_type": "Arm Inner", "value": "armsinner" }, { "trait_type": "Face Base", "value": "faceoutline" }, { "trait_type": "Eyes", "value": "Yellow" }, { "trait_type": "Mouth Type", "value": "Skeleton Type" }, { "trait_type": "Neck Accessory", "value": "catcollar5" }, { "trait_type": "Head Accessory", "value": "japanesetriangle" }, { "trait_type": "Speech", "value": "plain 3" } ] }
@Las499 could you paste the first 10-20 lines of the _metadata.json
file please.
@Las499 could you paste the first 10-20 lines of the
_metadata.json
file please.
[ { "name": "GrimCat #1", "description": "A cute, grumpy GrimCat! Unique and ready for a new home!", "file_url": "ipfs://NewUriToReplace/1.png", "custom_fields": { "dna": "dcee29c44db1ff3b85ba83ab5d104220738cae62", "edition": 1, "date": 1646532832718, "compiler": "HashLips Art Engine" },
@Las499 could you paste the first 10-20 lines of the
_metadata.json
file please.[ { "name": "GrimCat #1", "description": "A cute, grumpy GrimCat! Unique and ready for a new home!", "file_url": "ipfs://NewUriToReplace/1.png", "custom_fields": { "dna": "dcee29c44db1ff3b85ba83ab5d104220738cae62", "edition": 1, "date": 1646532832718, "compiler": "HashLips Art Engine" },
@Las499 could you paste the first 10-20 lines of the
_metadata.json
file please.
This works, but it goes to the wrong place (appends to the end of the items attributes)
Object.keys(data).forEach((item) => {
if (network == NETWORK.sol) {
item.name = ${namePrefix} #${item.edition}
;
item.description = description;
item.creators = solanaMetadata.creators;
} else {
item.name = ${namePrefix} #${item.edition}
;
item.description = description;
item.image = ${baseUri}/${item.edition}.png
;
}
fs.writeFileSync(
${basePath}/build/json/${item.edition}.json
,
JSON.stringify(item, null, 2)
);
});
@Las499 can you paste the error when it's data.forEach
.
@Erlhyenaplays can you copy/paste the full error please?