mu-semtech / mu-javascript-template

Template for running javascript/express microservices
4 stars 17 forks source link

bumping to 1.5.0-beta.2 results in `'return' outside of function ` #26

Closed nvdk closed 3 years ago

nvdk commented 3 years ago

After bumping lblob/notulen-prepublish-service from 1.3.5 to 1.5.0-beta.2 we could no longer build the service. It resulted in following error:

SyntaxError: /usr/src/app/app/node_modules/mkdirp/bin/cmd.js: 'return' outside of function. (13:4)
  11 | if (argv.help) {
  12 |     fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout);
> 13 |     return;
     |     ^
  14 | }
  15 |

Which we've traced back to https://github.com/substack/node-mkdirp/issues/159 . I believe bumping the babel dependencies should resolve the issue, but haven't had time to check yet.

nvdk commented 3 years ago

looks like this may be caused by a dependency on marawa

$ npm ls mkdirp
notulen-prepublish-service@0.10.0 /home/nielsv/Code/lblod/notulen-prepublish-service
└─┬ @lblod/marawa@0.0.8
  ├─┬ babel-cli@6.26.0
  │ └─┬ output-file-sync@1.1.2
  │   └── mkdirp@0.5.5  deduped
  └─┬ babel-register@6.26.0
    └── mkdirp@0.5.5