0

I am using node 7.1 with TypeScript to build a command-line utility. In my tests I invoke it using 'execFileSync'.

https://github.com/TheSwanFactory/maml/blob/script-expressions/test/syntax/script-spec.ts

import * as cp from "child_process";
...
const result = cp.execFileSync(hc_bin, args);

This runs fine on my local machine, but fails on the CodeShip CI with:

https://app.codeship.com/projects/194564/builds/21914340

TypeError: Object #<Object> has no method 'execFileSync'

I have verified that the proper @types/node typings module is being installed. I have tried to lock all my npm versions so the environment should be the same.

Any suggestions?

Dr. Ernie
  • 517
  • 4
  • 14
  • The build you linked to has an explicit `nvm install 0.10` listed as step 8 and runs on NodeJS 0.10.48 because of this. If you remove that command or adapt it to switch to Node 7.x it will very likely work. – mlocher Jan 23 '17 at 08:30

1 Answers1

0

I finally gave up and switched to CircleCI. The mysterious problem disappeared.

Dr. Ernie
  • 517
  • 4
  • 14