Closed betogess506 closed 7 years ago
Hi, I think this is a problem with a typo in the ReadMe, which has affectedItems rather than affectedSites.csv. When you rename it, does it work?
I just tried and unfortunately it doesn't:
Andres-MacBook-Pro:cloudbleed-1password Andre$ npm install npm WARN package.json cloudbleed@0.0.1 No repository field. Andres-MacBook-Pro:cloudbleed-1password Andre$ node index.js /Users/Andre/Desktop/Check urls/cloudbleed-1password/index.js:15 urls.forEach((originalUrl) => { ^^ SyntaxError: Unexpected token => at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10) at startup (node.js:129:16) at node.js:814:3 Andres-MacBook-Pro:cloudbleed-1password Andre$
Hi Andres,
Your file is in the right place. I think you're getting that error because the arrow-function (originalUrl) => {}
syntax is new in ECMA6 Javascript, and you probably have an old version of node installed.
Try typing node -v
and see what version you have. You are probably on 4.X (needed version is v6.7.0+)
Hi,
I am trying to run index.js but its failing with errror cloudbleed-1password/nodemodules/csv-parse/lib/index.js:389 throw Error("Invalid closing quote at line " + (this.lines + 1) + "; found " + (JSON.stringify(this..nextChar)) + " instead of delimiter " + (JSON.stringify(this.options.delimiter))); ^
Error: Invalid closing quote at line 350; found "s" instead of delimiter ","
at Error (native)
at Parser.__write (/Users/malcolmking/Desktop/cloudbleed-1password/node_modules/csv-parse/lib/index.js:389:19)
at module.exports (/Users/malcolmking/Desktop/cloudbleed-1password/node_modules/csv-parse/lib/sync.js:26:10)
at parseUrlsFromCsv (/Users/malcolmking/Desktop/cloudbleed-1password/index.js:26:13)
at Object.
I tried to look for the error in the index.js file but it did not fix the issue. Can anybody help here?
Ah interesting - looks like the script is having trouble parsing the CSV file you're giving it - it seems the input file may be malformed. Any small chance you exported as a .1pif instead of a CSV? If not that, it may be that one of the URLs that you exported has a comma, quote, or escape character in it.
Hope that helps.
Hey, any updates here?
Sorry for the delay. It was not the filetype. For some reason, the exported list contained a few entries that had extra commas and extra spaces. Not sure why this was the case, but must have been a user error when manually logging password entries. This is now resolved. Thank you!
In step 5.move affectedItems.csv to this repo. are you talking about >cloudbleed-1password ? I added the file there but I continuously get