-
Notifications
You must be signed in to change notification settings - Fork 104
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
fails while fetching ecommerce components - forEach on null #71
Comments
I'm getting the same error as @amsanket22. During:
Here are my settings (but I think it's more a simple error in your code):
I've also disabled everything in the env file -> BUILDINDEX=0, TEMPLATES=0 Nothing works. Please take a look at this problem, because at the moment your tool is (atleast for me) unuseable in my setting. My guess: |
I'll take a look at this. Yes, the crawler is sensitive to the HTML structure, so any deviations could cause issues. |
I just tested this on Windows 11 and was able to download all components for Vue. I checked the TWUI site and the "With image grid" component does have the Vue code. I wonder if the issue you had was perhaps you were downloading during the middle of them deploying an update. Have you tried it multiple times to see if are still experiencing the same problem? |
Hello kiliman, sorry for my late answer, I was on vacation. I have tried it more than multiple times, also now and I'm still getting the same error. For debugging I was looking into the code where the error appears. So the component that should be processed has no "snippets". Don't know why this is the case, but that is in the end the problem. I've then printed the JSON.stringify(component) in this case and got the following result:
So this is the component with the problem. Maybe you have an idea why this fails. Otherwise I wouldn't understand why we got different results ... |
I am getting this error because I don't have e-commerce components in my purchase. How can I ignore e-commerce componenets? |
This worked for me: diff --git a/index.mjs b/index.mjs
index 34711e9..cd65616 100755
--- a/index.mjs
+++ b/index.mjs
@@ -422,6 +422,7 @@ async function saveTemplates() {
const link = links[i]
const url = $(link).attr('href')
if (!url.startsWith('/components')) continue
+ if (url.startsWith('/components/ecommerce')) continue
urls.push(url)
}
const count = process.env.COUNT || urls.length |
Thanks. I should probably add a setting where you can specify which component sets you have purchased (default to all). |
@kiliman I am having the same issue. I tested this with a fresh build from today. I haven't purchased the ecommerce bundle and the script dies with the same "forEach on null" error. ![]() I also tested @manveru 's fix and it seems to be working. Any chance you could make the list of component sets an .env setting?
|
I added a COMPONENTS option to specify which component packages to download (defaults to all). See v4.1.0 |
@kiliman amazing, I verified that thus works well now, thanks for the quick turnaround |
Writing vue with_image_grid.vue
‼️ TypeError: Cannot read properties of null (reading 'forEach')
The text was updated successfully, but these errors were encountered: