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

Unable to install Core on windows #303

Closed
dipyalov opened this issue Jul 14, 2017 · 12 comments
Closed

Unable to install Core on windows #303

dipyalov opened this issue Jul 14, 2017 · 12 comments

Comments

@dipyalov
Copy link
Contributor

dipyalov commented Jul 14, 2017

Composer has errors to report:                                                                                                                        
  [ErrorException]                                                                                                     
  ZipArchive::extractTo(C:\Users\dipya\.atom\packages\php-integrator-base\core/vendor/composer/343aa8f8/core-794a09b4  
  0810d35c6b5dc9742aed18d12e5b3c0f-794a09b40810d35c6b5dc9742aed18d12e5b3c0f\src\Indexing\Structures\Mapping/PhpIntegr  
  ator.Indexing.Structures.FileNamespaceImport.dcm.xml): failed to open stream: No such file or directory 

I think, this path is definitely longer than 256 characters, so this might cause issues on Windows

@Gert-dev
Copy link
Owner

Gert-dev commented Jul 14, 2017

Indeed, that's a very long path. The path in the error seems to be a path that isn't used at runtime (the file is loaded from the src directory instead). The path used by the core is around 160 characters here:

/home/some_user/.atom/packages/php-integrator-base/core/3.0.0/src/Indexing/Structures/Mapping/PhpIntegrator.Indexing.Structures.TraitTraitPrecedence.dcm.xml

It seems you are right in thinking that this is a path issue with Windows and Composer, but the issue seems to lie somewhat out of my control. (I could try to shorten the filenames, but I believe the naming of the metadata files is important for Doctrine to pick them up automatically.)

Could you try removing --prefer-dist in CoreManager.coffee from the base package and letting the core reinstall? Perhaps the issue can be solved by not using the archive downloads of the packages, but instead attempting to clone from Git. If that works, I could simply remove the option from the base package to work around the issue for Windows users.

@dipyalov
Copy link
Contributor Author

Is there a way to reinstall core without reinstalling base?

@Gert-dev
Copy link
Owner

Yes, you can simply remove everything in the the core folder of the base package and then restart Atom. It should automatically attempt to redownload the core.

@dipyalov
Copy link
Contributor Author

Removing --prefer-dist didn't help, but replacing it with --prefer-source seems to do the job.
But then the installation process stops on:

Composer has errors to report: Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]? 

@dipyalov
Copy link
Contributor Author

I'll try adding --no-interaction

@nahuelhds
Copy link

Hi. Just wanted to let you know that for me (Windows 10 64 bits user) worked fine by replacing --prefer-dist with --prefer-source and also adding --no-interaction as mentioned by @dipyalov

@dipyalov
Copy link
Contributor Author

Yep, in the end it did install fine!

@VentyCZ
Copy link

VentyCZ commented Jul 15, 2017

image
image

@jatubio
Copy link

jatubio commented Jul 15, 2017

Thank you all.

Replacing --prefer-dist with --prefer-source and also adding --no-interaction worked fine on Windows Server 2008 (x64) and Atom 1.19.0-beta4 x64

@Gert-dev
Copy link
Owner

Thanks for taking the time to debug this. I've published 3.0.1 that uses the options that work on Windows as well.

@Floeig
Copy link

Floeig commented Aug 3, 2017

Hello all,
I'm using the 3.0.1 but I still get the issue. So far it seems that it's not looking for the right git directory.
Any help?

this is what I tried after atom told me that it failed.
apm install php-integrator/core
Cloning https://github.com/php-integrator/core.git failed
Cloning git+ssh://git@github.com/php-integrator/core.git failed
Couldn't clone https://github.com/php-integrator/core.git or git+ssh://git@github.com/php-integrator/core.git

thanks you

@Gert-dev
Copy link
Owner

Gert-dev commented Aug 3, 2017

@FlorianGirardEIG You can't use apm to install the core (anymore), that was only the case in an older version of the base package. You only need to install the base package and it will automatically download the core.

If the installation fails, errors should be listed in the developer tools.

If you wish to manually download the core, you can also install it via Composer in the right directory.

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

No branches or pull requests

6 participants