Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on running getstorybook #430

Closed
sonicviz opened this issue Sep 6, 2016 · 24 comments
Closed

Error on running getstorybook #430

sonicviz opened this issue Sep 6, 2016 · 24 comments

Comments

@sonicviz
Copy link

sonicviz commented Sep 6, 2016

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`.
@thani-sh
Copy link
Contributor

thani-sh commented Sep 6, 2016

Hi,
Is there an npm-debug.log file in your project directory? It may have more information on why npm install failed.

@sonicviz
Copy link
Author

sonicviz commented Sep 6, 2016

no

@thani-sh
Copy link
Contributor

thani-sh commented Sep 6, 2016

Can you post the link to the todo list repo

@sonicviz
Copy link
Author

sonicviz commented Sep 6, 2016

No I can't because it's a paid template: https://wrapbootstrap.com/theme/rubix-reactjs-powered-admin-template-WB09498FH

Cheap, but paid nonetheless. The project was the meteor react todo example they have as a sample and also as a tutorial (different from MDG guide react todo)
Was working fine, added storybook and broke it badly!

@arunoda
Copy link
Member

arunoda commented Sep 6, 2016

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.

@arunoda
Copy link
Member

arunoda commented Sep 6, 2016

May be this is a related issue: #423

@sonicviz
Copy link
Author

sonicviz commented Sep 6, 2016

I tried both guides, same error.

I'd email [email protected] and ask them for a free copy of rubix. They'd probably give you one considering what you do and the reported bug. If they do try it with the example meteor react todo project. That's how I got the error.

@darthtrevino
Copy link
Contributor

I ran into this issue, but it's because my machine was configured to use a Sinopia proxy instead of the global NPM registry directly.

@arunoda
Copy link
Member

arunoda commented Sep 15, 2016

I hope we can close this now.

@arunoda arunoda closed this as completed Sep 15, 2016
@sonicviz
Copy link
Author

Don't know, afaik it's still there!

@arunoda
Copy link
Member

arunoda commented Sep 16, 2016

Try this: #122 (comment)

@Nesciosquid
Copy link

I am running into this on both my Win7 and Win10 machines, regardless of which repo I try to install to.

@robcaldecott
Copy link

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();
};

@usulpro
Copy link
Member

usulpro commented Nov 30, 2016

Looks like it's the same issue #628

I changed it to
result = shell.exec('npm install');
and it works as well!

@alebrozzo
Copy link

Just doing npm i after the original failing message
An error occured while running 'npm install'
worked for me.

@arunoda
Copy link
Member

arunoda commented Jan 12, 2017

@alebrozzo could you check the errors on npm.log or similar file in the root of your app.

@ilan-schemoul
Copy link

The problem is still here

@zhouchengcom
Copy link

Looks like it's the same issue #628

I changed it to Absolute path

spawnSync('C:/Users/Administrator/AppData/Roaming/npm/npm.cmd'
and it works as well!

@veerjainATgmail
Copy link

was getting the above error.. later I tried,

npm i -g @storybook/cli
cd my-react-app
getstorybook

it worked..

@claym
Copy link

claym commented Jul 1, 2017

changing it to npm.cmd seems to have addressed it for me as well.

@usulpro
Copy link
Member

usulpro commented Jul 1, 2017

@claym it should be solved in v3.x
what version of Storybook do you use?

@claym
Copy link

claym commented Jul 2, 2017

well, today i installed via npm install --global getstorybook which seems to be 1.7.0

but apparently that's the wrong package to use :D

I was following a tutorial. Seems storybook/cli works!

So, nevermind!

@dcu-sharepoint
Copy link

dcu-sharepoint commented Jul 22, 2017

can't get getstorybook to run on a newly minted mac-mini on a hello-storybook app created to follow these commands

npm i -g create-react-app getstorybook
create-react-app hello-react
cd hello-react
getstorybook

everything runs except the getstorybook line and the error i get is:
~bash: getstorybook: command not found

I installed the app with both yarn and npm 5.3.0 but I can't find any trace of a storybook file anywhere

@marcelorl
Copy link

marcelorl commented Sep 20, 2017

@dcu-sharepoint, the package you should install is @storybook/cli then it enables this getstorybook command for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests