TypeError: Cannot read property 'error' of undefined
at create_named_node_escapeless (/scratch/lrd900/node/node_modules/@graphy/content.nt.read/main.js:300:66)
at Reader.statement (/scratch/lrd900/node/node_modules/@graphy/content.nt.read/main.js:635:20)
at Reader.parse (/scratch/lrd900/node/node_modules/@graphy/content.nt.read/main.js:519:21)
at NTriples_Reader.transform [as _transform] (/scratch/lrd900/node/node_modules/@graphy/content.nt.read/main.js:370:11)
at NTriples_Reader.Transform._read (/scratch/lrd900/node/node_modules/readable-stream/lib/_stream_transform.js:177:10)
at NTriples_Reader.Transform._write (/scratch/lrd900/node/node_modules/readable-stream/lib/_stream_transform.js:164:83)
at doWrite (/scratch/lrd900/node/node_modules/readable-stream/lib/_stream_writable.js:409:139)
at writeOrBuffer (/scratch/lrd900/node/node_modules/readable-stream/lib/_stream_writable.js:398:5)
at NTriples_Reader.Writable.write (/scratch/lrd900/node/node_modules/readable-stream/lib/_stream_writable.js:307:11)
at ReadStream.ondata (_stream_readable.js:728:22)
The reader will now err about the invalid IRI, which can either be caught in the 'error' event handler, or bypassed altogether using the relax option to the reader to skip IRI validation. Is this the behavior you expected?
I've got a
test.nt
file that contains this line:When I run this script:
Then I get this error: