fs-extra version: ^9.0.0> node ./main.js
.../node_modules/fs-extra/lib/mkdirs/make-dir.js:86
} catch {
^
SyntaxError: Unexpected token {
Looks like it should be catch (e) { ?
You will need to change the line 86 of this file to ( and in many other places/files too, follow the errors until there are none ):
} catch(error) {
duplicate of #771.
I'm still having the same issue on:
After replacing } catch { with } catch(error) { in multiple files, it's finally working.
@geneparcellano What's your setup? Do you have babel or some bundler in your setup? What's the exact error message you're getting?
I'd like to report the same issue when running jest on TeamCity. Here are the CI server details:
Here's the relevant error log:
C:\BuildAgent1\work\e7499cbf9ff8fce2\src\RTMap.Web\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> (C:\BuildAgent1\work\e7499cbf9ff8fce2\src\RTMap.Web\node_modules\fs-extra\lib\mkdirs\index.js:3:44)
FYI I'm running jest via vue-cli-service.
Is your CI server actually on Node v12?
Is your CI server actually on Node v12?
Turns out TC was reporting the wrong node version. I checked again, and sure enough, it was running v8 for some reason.
It's running fine now. Thanks.
Most helpful comment
You will need to change the line 86 of this file to ( and in many other places/files too, follow the errors until there are none ):
} catch(error) {