storybook: Error on running getstorybook

Hi, I have a test meteor react todo project which runs fine, and wanted to add storybook to learn it while prototyping some new UI components.

Tried the recommended setup sequence but gets fails on:

G:\Meteor Projects\Meteor 1.4\rubix-meteor-todolist>getstorybook

getstorybook - the simplest way to add a storybook to your project.

• Detecting project type. ✓ • Adding storybook support to your “Meteor” app. ✓ • Preparing to install NPM dependencies. ✓ • Installing NPM dependencies. ✖

 An error occured while running `npm install`.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 24 (10 by maintainers)

Most upvoted comments

The problem is spawnSync, used in lib/helpers.js. If you change the npm command to npm.cmd then it works.

exports.installDeps = function (options) {
  var done = exports.commandLog('Preparing to install dependencies');
  done();
  console.log();

  var result;
  if (options.useYarn) {
    result = spawnSync('yarn', { stdio: 'inherit' });
  } else {
    result = spawnSync('npm.cmd', ['install'], { stdio: 'inherit' });
  }

  done = exports.commandLog('Installing dependencies');
  if (result.status !== 0) {
    done('An error occurred while installing dependencies.');
    process.exit(1);
  }
  done();
};

We need to see what’s actually breaking here. It’s hard to say without seeing any error info. Anyway, try to use our Slow Start Guide.