goenning / google-indexing-script

Script to get your site indexed on Google in less than 48 hours
https://seogets.com
MIT License
6.96k stars 483 forks source link

i always get this error fetch is not defined when submit the domain #36

Open KressIsMee opened 7 months ago

KressIsMee commented 7 months ago

npm run index domain.com

google-indexing-script@0.0.2 index ts-node ./src/cli.ts domain.com

πŸ”Ž Processing site: sc-domain:domain.com /seo/google-indexing-script/src/shared/utils.ts:19 const response = await fetch(url, options); ^ ReferenceError: fetch is not defined at fetchRetry (/seo/google-indexing-script/src/shared/utils.ts:19:22) at fetchRetry (seo/google-indexing-script/src/shared/utils.ts:29:12) at fetchRetry (/seo/google-indexing-script/src/shared/utils.ts:29:12) at fetchRetry (/seo/google-indexing-script/src/shared/utils.ts:29:12) at fetchRetry (/seo/google-indexing-script/src/shared/utils.ts:29:12) at fetchRetry (/seo/google-indexing-script/src/shared/utils.ts:29:12) at getSitemapsList (/seo/google-indexing-script/src/shared/sitemap.ts:8:36) at getSitemapPages (/seo/google-indexing-script/src/shared/sitemap.ts:38:26) at index (/seo/google-indexing-script/src/index.ts:50:50) at processTicksAndRejections (node:internal/process/task_queues:96:5)

goenning commented 7 months ago

Your node is probably outdated, try updating that first.

@AntoineKM maybe we could check for presence of β€œfetch” and then exit early

AntoineKM commented 7 months ago

Hey, it's because you are using a version of Node prior to 18.

See: https://stackoverflow.com/a/48433898/12379218

AntoineKM commented 7 months ago

Your node is probably outdated, try updating that first.

@AntoineKM maybe we could check for presence of β€œfetch” and then exit early

We could implement node-fetch

KressIsMee commented 7 months ago

thanks by upgrading node problem solved but i got another error


(node:172055) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created) πŸ”Ž Processing site: sc-domain:mywebsite.com πŸ” This service account doesn't have access to this site. ❌ No sitemaps found, add them to Google Search Console and try again. and im sure the service account json file in the right place

AntoineKM commented 7 months ago

Nice ! Did you miss this step ?

image
KressIsMee commented 7 months ago

Untitleffdfd

Untitled nop i didn't

AntoineKM commented 7 months ago

Are you sure you're on the right property? npm run index domain.com or npm run index https://domain.com are different properties, you might try both of them

KressIsMee commented 7 months ago

Are you sure you're on the right property? npm run index domain.com or npm run index https://domain.com are different properties, you might try both of them

i tryed all how can i prove that onn the right probarty i tryed all not working

KressIsMee commented 7 months ago

I'm so frustrated i have only one website and only now google console account

AntoineKM commented 7 months ago

We'll get there, don't worry, I also remember having trouble setting up the project, this will help me remember what it was and put together clearer information in the README.

Did you activate these apis:

KressIsMee commented 7 months ago

thanks a lot it works perfect i think i just i forget and enabled it on other project , can i access it through web, that can have multiple services account , cause i exceeded the limits of one services account and when i changed it repeats the same urls till it exceeded the limits on the same urls and control it locally, thanks a lot node --trace-deprecation ... to show where the warning was created) πŸ”Ž Processing site: https://www.domain.com/ πŸ‘‰ Found 4735 URLs in 1 sitemap πŸ“¦ Batch 1 of 95 complete πŸ“¦ Batch 2 of 95 complete πŸ“¦ Batch 3 of 95 complete πŸ“¦ Batch 4 of 95 complete πŸ“„ Processing url: https://www.dmain/prepare for power cuts and travel disruptions as storm isha hits the uk πŸ•› Indexing already requested previously. It may take a few days for Google to process it.

πŸ“„ Processing url: https://www.dmain/arsenal edges past spirited everton in close encounter πŸ•› Indexing already requested previously. It may take a few days for Google to process it.

πŸ“„ Processing url: https://www.dmain/murderonthedancefloor: the latest viral trend on tiktok πŸ•› Indexing already requested previously. It may take a few days for Google to process it.

πŸ“„ Processing url: https://www.dmain/night swim: a lukewarm attempt at horror by blumhouse productions πŸ•› Indexing already requested previously. It may take a few days for Google to process it.

πŸ“„ Processing url: https://www.dmain/breakingnews: silt police investigate incident involving u.s. rep. lauren boebert and ex-husband πŸ•› Indexing already requested previously. It may take a few days for Google to process it.

πŸ“„ Processing url: https://www.dmain/green bay packers secure nfc wild card playoff spot with victory over chicago bears πŸ•› Indexing already requested previously. It may take a few days for Google to process it.

AntoineKM commented 7 months ago

I've seen guys use this technique on another software, I don't know if it's authorized by Google, but if it works, you can try opening a pull request with the possibility of having several service accounts.

KressIsMee commented 7 months ago

is there any genuine web control panel for this script ? that would be awesome to change these setting even manually but through web

AntoineKM commented 7 months ago

Not at the moment, but it was one of my ideas 😁

KressIsMee commented 7 months ago

Not at the moment, but it was one of my ideas 😁

Its great and I like it I just facing this problem Indexing already requested previously and I can't index the new articles cause its always catch the old links according to sitemap.xml arrangement so I never got the chance to index the new lines πŸ˜’