dzt/shopify-monitor

throw er; // Unhandled 'error' event

Closed this issue · 6 comments

`events.js:154
throw er; // Unhandled 'error' event
^

TypeError: Cannot read property 'url' of undefined
at /Users/alexlaw/code/sneakers/shopify/shopify-monitor/lib/index.js:177:41
at Parser. (/Users/alexlaw/code/sneakers/shopify/shopify-monitor/node_modules/xml2js/lib/xml2js.js:489:18)
at emitOne (events.js:90:13)
at Parser.emit (events.js:182:7)
at Object.onclosetag (/Users/alexlaw/code/sneakers/shopify/shopify-monitor/node_modules/xml2js/lib/xml2js.js:447:26)
at emit (/Users/alexlaw/code/sneakers/shopify/shopify-monitor/node_modules/sax/lib/sax.js:640:35)
at emitNode (/Users/alexlaw/code/sneakers/shopify/shopify-monitor/node_modules/sax/lib/sax.js:645:5)
at closeTag (/Users/alexlaw/code/sneakers/shopify/shopify-monitor/node_modules/sax/lib/sax.js:905:7)
at Object.write (/Users/alexlaw/code/sneakers/shopify/shopify-monitor/node_modules/sax/lib/sax.js:1452:13)
at Parser.exports.Parser.Parser.parseString (/Users/alexlaw/code/sneakers/shopify/shopify-monitor/node_modules/xml2js/lib/xml2js.js:508:31)

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v5.10.1
npm ERR! npm v3.8.3
npm ERR! code ELIFECYCLE
npm ERR! shopify-monitor@1.0.0 start: node --expose_gc monitor.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the shopify-monitor@1.0.0 start script 'node --expose_gc monitor.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the shopify-monitor package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node --expose_gc monitor.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs shopify-monitor
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls shopify-monitor
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/alexlaw/code/sneakers/shopify/shopify-monitor/npm-debug.log`

Having the same problems!

Seems to be a memory leak. Not sure how to fix this.

dzt commented

Working on the fix in a new update.

Threw the error when I had a certain link in my list of sitemaps on config.json:
"https://vlone.co/collections/vlone/sitemap_products_1.xml"
--gave me the error, taking it out cleared it up just fine.

Sitemap for vlone looked like this:

Not Found

Check your sitemaps for each website, and if they aren't normal-looking take them out, script should work just fine.

There a fix for this issue?, i get this with just the 2 sample urls

Version 2 has been released with many bug fixes and an overall revamp of codebase - please attempt on version 2 and reopen if your issue still arises, or create a new one if a different bug appears.