GrapesJS / cli

GrapesJS CLI helper for the development
MIT License
100 stars 29 forks source link

SyntaxError: Invalid or unexpected token? #284

Closed Ram-Mach closed 1 year ago

Ram-Mach commented 1 year ago

getting /grapesjs-my-plugin/node_modules/path-scurry/node_modules/lru-cache/dist/cjs/index.js:52 this.signal.onabort?.(reason); ^

SyntaxError: Invalid or unexpected token at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)

marktamis commented 1 year ago

for some reason optional chaining is not working in lru-cache (I'm on nodejs 18.6.0)

As a workaround I went thru the file you mentioned to replace these - ?. and ?.) - to not make them optional and that got me through to be able to start the interactive setup

TO-smichaelsen commented 1 year ago

I got the same error and managed to start the init task @marktamis workaround.

Node v16.20.0 lru-cache 5.1.1

artf commented 1 year ago

https://github.com/GrapesJS/cli/issues/282#issuecomment-1578260790