TheStanfordDaily / archives-web

Helper functions and web app for METS/ALTO archive viewing.
https://archives.stanforddaily.com
6 stars 2 forks source link

Getting errors when running the script - "Cannot read property 'nodeValue' of undefined" #6

Closed epicfaace closed 5 years ago

epicfaace commented 5 years ago

Getting errors when running the script

The last successful file parsed was text/1894/4/26/DIVL151.txt Adv. 17 Page 4

(node:15545) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'nodeValue' of undefined
    at Paper._callee$ (/home/ec2-user/environment/node_modules/@thestanforddaily/archives-web/lib/classes/Paper.js:85:63)
    at tryCatch (/home/ec2-user/environment/node_modules/regenerator-runtime/runtime.js:45:40)
    at Generator.invoke [as _invoke] (/home/ec2-user/environment/node_modules/regenerator-runtime/runtime.js:271:22)
    at Generator.prototype.(anonymous function) [as next] (/home/ec2-user/environment/node_modules/regenerator-runtime/runtime.js:97:21)
    at asyncGeneratorStep (/home/ec2-user/environment/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/home/ec2-user/environment/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:15545) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:15545) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
epicfaace commented 5 years ago

This line is causing it -- https://github.com/TheStanfordDaily/archives-web/blob/c3e0d63a2cb948c1fee0798a4e893b892c0eb604/src/classes/Paper.js#L34