Open kylona opened 2 years ago
Looks like the issue is your Node.js version. Yes, you are correct about those lines being semantically equivalent, node 12 just doesn't support that syntax.
pico-engine supports the LTS version which is 16. You can get it from here: https://nodejs.org/en/
I ran into an issue trying to install the krl-compiler.
I was following the instructions here: https://picolabs.atlassian.net/wiki/spaces/docs/pages/31544297/Developer+Tips+for+Pico+Engine#DeveloperTipsforPicoEngine-ParsingKRL
The npm command finished successfully. And I think I got the code installed correctly. However, when running the command to check the version I ran into this error:
It looks like optional chaining is not being parsed correctly. This likely is an issue with my node setup. This is the node version I'm running.
I am running on an old Mac that runs high sierra.
I was able to work around it by changing line 66 of krl-compiler/bin/krl-compiler:66 from:
if (err?.where?.line && err?.where?.col) {
toif (err && err.where && err.where.line && err.where.col) {
which I believe is semanticly equivalent.Similarly I changed line 73 to:
if (err && err.where && err.where.excerpt) {
Any ideas about what might be causing this?