Hi,
When I connect via the SSH module, and issue the command “node /root/scraping/scrape-new.js” or variations thereof, I receive the error below.
When I connect to the server via my terminal and run the same command, it works.
ERROR
/root/scraping/scrape-new.js:63\n})().catch(err => console.error(err)). finally(() => browser ?. close());\n ^\n\nSyntaxError: Unexpected token .\n at Module._compile (internal/modules/cjs/loader.js:723:23)\n at Object.Module._extensions…js (internal/modules/cjs/loader.js:789:10)\n at Module.load (internal/modules/cjs/loader.js:653:32)\n at tryModuleLoad (internal/modules/cjs/loader.js:593:12)\n at Function.Module._load (internal/modules/cjs/loader.js:585:3)\n at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)\n at startup (internal/bootstrap/node.js:283:19)\n at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
The workflow is below. The SSH1 node works, issuing the command “dropbox start”. So my connection is good and my login has the correct permissions etc.
The 2nd SSH node doesn’t work. I have tried it with a slash in the “Working Directory” field and without. I have tried putting the full path to the file in the “Working Directory” field. Lastly I have tried putting the path to the folder the “scrape-new.js” file is in, and doing the “ls” command, and the output shows that I am in fact in the correct folder. I’m not sure what else to try.