The tests kept failing when running multiple times, because this Spike.new tries to install NPM dependencies without a check for existence of a package.json file, so if the new Spike project was in a child directory of another node project, it would call the 'npm install --production' on the parent instead — which is a problem, especially for repositories using yarn.
This add a synchronous explicit check for 'package.json' before trying to install.
The tests kept failing when running multiple times, because this Spike.new tries to install NPM dependencies without a check for existence of a package.json file, so if the new Spike project was in a child directory of another node project, it would call the 'npm install --production' on the parent instead — which is a problem, especially for repositories using yarn.
This add a synchronous explicit check for 'package.json' before trying to install.