v8flags icon indicating copy to clipboard operation
v8flags copied to clipboard

'--v8-options' not returning properly in CircleCI

Open peterp opened this issue 7 years ago • 6 comments

I'm trying to use babel-node on CircleCI, but for some reason getFlags(cb) isn't returning the '--v8-options' properly:

/home/circleci/project/packages/upload-to-helpdocs/node_modules/v8flags/index.js:86
    var flags = result.match(/\s\s--[\w-]+/gm)
    ^

TypeError: Unable to get property 'map' of undefined or null reference

https://github.com/gulpjs/v8flags/blob/eeb439ac94301e05608f82f652bfa79f628d5b8b/index.js#L86

I'm not sure if this is an issue with Docker/ CircleCI/ or babel-node, so my apologies if this is an annoying issue.

peterp avatar May 09 '19 09:05 peterp

It looks like somehow the result isn't matching the expected output. I have a few more questions.

  • What version of node are you using?
  • Are you relying on the output of v8flags or is this part of something like gulp?
  • If it's happening as part of gulp, are you trying to respawn with any node flags? I'm thinking I might just noop the result.

phated avatar May 09 '19 09:05 phated

  • I'm using node v10.13.0
  • I'm not relying on it specifically; it's used by babel-node:

https://github.com/babel/babel/blob/1969e6b6aa7d90be3fbb3aca98ea96849656a55a/packages/babel-node/package.json#L27

https://github.com/babel/babel/blob/1969e6b6aa7d90be3fbb3aca98ea96849656a55a/packages/babel-node/src/babel-node.js#L45-L65

peterp avatar May 09 '19 10:05 peterp

Alright. I'm just going to return an empty array. It's not exactly correct but it's better than crashing.

phated avatar May 09 '19 11:05 phated

I'm running into CI issues with my additional test. Will try to get this fixed soon.

phated avatar May 09 '19 11:05 phated

Thank you so much <3

peterp avatar May 09 '19 12:05 peterp

@peterp just released as v3.1.3 - please update your dependencies (assuming they follow semver). Also make sure to update or remove any lockfiles.

phated avatar May 09 '19 12:05 phated