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

Can't install: Pull is not possible because you have unmerged files. #3410

Closed
er-dev opened this issue Apr 12, 2018 · 7 comments
Closed

Can't install: Pull is not possible because you have unmerged files. #3410

er-dev opened this issue Apr 12, 2018 · 7 comments

Comments

@er-dev
Copy link

er-dev commented Apr 12, 2018

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:

On branch va5
Your branch is up-to-date with 'origin/va5'.
nothing to commit, working directory clean

git diff has no output

Steps 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)

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

 • Detecting project type. ✓
 • Adding storybook support to your "React" app. ✓
 • Preparing to install dependencies. ✓

yarn install v0.22.0
info No lockfile found.
[1/4] 🔍  Resolving packages...
warning @storybook/react > [email protected]: 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.
@er-dev
Copy link
Author

er-dev commented Apr 12, 2018

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/[email protected], 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?

@Hypnosphi
Copy link
Member

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?

@er-dev
Copy link
Author

er-dev commented Apr 17, 2018

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 > [email protected]: 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 > [email protected]: 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.

@Hypnosphi
Copy link
Member

Looks like you're using a very outdated version of yarn. Please try installing the latest one
https://yarnpkg.com/en/docs/install

@Hypnosphi
Copy link
Member

#3453 should help in cases like yours, when you have an old yarn installed which you don't actually use

@er-dev
Copy link
Author

er-dev commented Apr 23, 2018

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.

@Hypnosphi
Copy link
Member

Run npm i -g @storybook/cli to update

Did you try that?

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

3 participants