2

I have been working on a project and recently, in Circle CI pipelines, I started to get this error.

/root/project/node_modules/fs-extra/lib/mkdirs/make-dir.js:85
  } catch {
          ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/root/project/node_modules/fs-extra/lib/mkdirs/index.js:3:44)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)

I see some discussions about it online.

https://github.com/google/docsy/issues/265

https://www.gitmemory.com/issue/jprichardson/node-fs-extra/790/614647362

The nodejs version is 12.16.1 The fs-extra version is 9.0.1, in the cases, it was mentioned as ^9.0.0.

Does anyone know where this error comes from, and how to fix it? It seems like I am aligned with my node version (over v10) and the fs-extra. I prefer not to downgrade unless it is the only solution atm.

Dustin Ingram
  • 20,502
  • 7
  • 59
  • 82
Sojimanatsu
  • 619
  • 11
  • 28

0 Answers0