Closed er-dev closed 6 years ago
After receiving that error, I ran git status
again:
On branch va5
Your branch is up-to-date with 'origin/va5'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: package.json
Untracked files:
(use "git add <file>..." to include in what will be committed)
.storybook/
stories/
So I added the untracked files to git and commited them.
git status
came back clean after that:
On branch va5
Your branch is up-to-date with 'origin/va5'.
nothing to commit, working directory clean
So I ran getstorybook
again and received this message:
getstorybook - the simplest way to add a storybook to your project.
• Detecting project type. ✓
There seems to be a storybook already available in this project.
Apply following command to force:
getstorybook -f
But I know the dependencies are not installed because of the original error.
I then ran getstorybook -f
and received the original error again.
So I ran npm install
which added 97 packages, removed 172 packages, updated 55 packages and moved 9 packages in 18.99s
And received a webpack compilation error about @babel/core
.
I found this issue and ran npm i -g @storybook/cli@3.3.15
, removed Storybook from my project entirely, and followed my steps again. This time, after running npm install
, storybook works.
This was quite the workaround way to install Storybook, is this intentional?
I wasn't able to reproduce it using following steps:
npm i -g create-react-app @storybook/cli
create-react-app test
cd test
git init
git add -A
git commit -m init
getstorybook
Can you please create a GitHub repo with minimal reproduction of your issue?
I am not using create-react-app
, but Meteor instead:
curl https://install.meteor.com/ | sh
meteor create test --bare
cd test/
git init
git add -A
git commit -m init
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 dependencies. ✓
yarn install v0.22.0
info No lockfile found.
[1/4] 🔍 Resolving packages...
warning babel-root-slash-import > babel@6.23.0: In 6.x, the babel package has been deprecated in favor of babel-cli. Check https://opencollective.com/babel to support the Babel maintainers
warning @storybook/react > webpack-hot-middleware@2.22.0: Accidentally doesn't hot reload if warnings are seen
error Command failed.
Exit code: 128
Command: git
Arguments: pull
Directory: /Users/andrew/Library/Caches/Yarn/v1/.tmp/a71eb20c6f8366926c96610aa7b336f4
Output:
error: Pull is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
• Installing dependencies. ✖
An error occurred while installing dependencies.
Looks like you're using a very outdated version of yarn. Please try installing the latest one https://yarnpkg.com/en/docs/install
Updated to Yarn 1.6.0. Still receiving an error installing dependencies:
getstorybook - the simplest way to add a storybook to your project.
• Detecting project type. ✓
• Adding storybook support to your "Meteor" app. ✓
• Preparing to install dependencies. ✓
yarn install v1.6.0
info No lockfile found.
[1/4] 🔍 Resolving packages...
error Command failed.
Exit code: 128
Command: git
Arguments: pull
Directory: /Users/andrew/Library/Caches/Yarn/v1/.tmp/a71eb20c6f8366926c96610aa7b336f4
Output:
error: Pull is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
• Installing dependencies. ✖
An error occurred while installing dependencies.
╭───────────────────────────────────────────╮
│ │
│ Update available 3.3.15 → 3.4.2 │
│ Run npm i -g @storybook/cli to update │
│ │
╰───────────────────────────────────────────╯
But meteor npm install
works to install them, and npm run storybook
works now.
Updating yarn fixed the issue with the Git errors.
Run npm i -g @storybook/cli to update
Did you try that?
When running
getstorybook
I receive an error that it cannot install dependencies because I have unmerged files in git. I do not:git status
output:git diff
has no outputSteps to reproduce
Run
getstorybook
OS X 10.11.6 Node 8.9.1 NPM 5.6.0 In a brand new bare Meteor app (created with
meteor create xyz --bare
)Screenshots / Screencast / Code Snippets (Optional)