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

Automatically remove existing core folder on core installation #331

Closed
tjapro opened this issue Aug 22, 2017 · 9 comments
Closed

Automatically remove existing core folder on core installation #331

tjapro opened this issue Aug 22, 2017 · 9 comments
Labels

Comments

@tjapro
Copy link

tjapro commented Aug 22, 2017

Atom can't install core without Composer.
The following lines in the dev-panel logs:

Composer has errors to report: Installing php-integrator/core (3.0.0)
(anonymous) @ C:\Users\Programação\.atom\packages\php-integrator-base\lib\ComposerService.coffee:76

Composer has errors to report:                                                                                                        
  [InvalidArgumentException]                                                                           
  Project directory C:/Users/Programação/.atom/packages/php-integrator-base/core/3.0.0/ is not empty.  

Uncaught (in promise) TypeError: Cannot read property 'getProps' of null
    at ProjectManager.module.exports.ProjectManager.getProjectSettings (file:///C:/Users/Programação/.atom/packages/php-integrator-base/lib/ProjectManager.coffee:373:12)
    at ProjectManager.module.exports.ProjectManager.getCurrentProjectSettings (file:///C:/Users/Programação/.atom/packages/php-integrator-base/lib/ProjectManager.coffee:382:17)
    at Service.module.exports.Service.getCurrentProjectSettings (file:///C:/Users/Programação/.atom/packages/php-integrator-base/lib/Service.coffee:61:32)
    at TooltipProvider.module.exports.TooltipProvider.getIntentions (file:///C:/Users/Programação/.atom/packages/php-integrator-base/lib/TooltipProvider.coffee:88:35)
    at Object.getIntentions (file:///C:/Users/Programação/.atom/packages/php-integrator-base/lib/TooltipProvider.coffee:78:25)
    at file:///C:/Users/Programação/.atom/packages/intentions/lib/providers-list.js:45:28
    at file:///C:/Users/Programação/.atom/packages/intentions/lib/providers-list.js:44:23
    at Set.forEach (native)
    at ProvidersList.<anonymous> (file:///C:/Users/Programação/.atom/packages/intentions/lib/providers-list.js:42:20)
    at Generator.next (<anonymous>)
    at step (C:\Users\Programação\.atom\packages\intentions\lib\providers-list.js:7:273)
    at C:\Users\Programação\.atom\packages\intentions\lib\providers-list.js:7:443
    at ProvidersList.<anonymous> (C:\Users\Programação\.atom\packages\intentions\lib\providers-list.js:7:99)
    at file:///C:/Users/Programação/.atom/packages/intentions/lib/main.js:30:48
    at Generator.next (<anonymous>)
    at step (C:\Users\Programação\.atom\packages\intentions\lib\main.js:9:273)
    at C:\Users\Programação\.atom\packages\intentions\lib\main.js:9:443
    at C:\Users\Programação\.atom\packages\intentions\lib\main.js:9:99
    at file:///C:/Users/Programação/.atom/packages/intentions/lib/commands.js:219:14
    at Emitter.emit (C:\Users\Programação\.atom\packages\intentions\node_modules\sb-event-kit\lib\emitter.js:84:36)
    at Commands.<anonymous> (file:///C:/Users/Programação/.atom/packages/intentions/lib/commands.js:209:24)
    at Generator.next (<anonymous>)
    at step (C:\Users\Programação\.atom\packages\intentions\lib\commands.js:9:273)
    at C:\Users\Programação\.atom\packages\intentions\lib\commands.js:9:443
    at Commands.<anonymous> (C:\Users\Programação\.atom\packages\intentions\lib\commands.js:9:99)
    at Commands.<anonymous> (file:///C:/Users/Programação/.atom/packages/intentions/lib/commands.js:127:21)
    at Generator.next (<anonymous>)
    at step (C:\Users\Programação\.atom\packages\intentions\lib\commands.js:9:273)
    at C:\Users\Programação\.atom\packages\intentions\lib\commands.js:9:443
    at Commands.<anonymous> (C:\Users\Programação\.atom\packages\intentions\lib\commands.js:9:99)
    at HTMLElement.intentionsShow (file:///C:/Users/Programação/.atom/packages/intentions/lib/commands.js:40:14)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\Programação\AppData\Local\atom\app-1.19.2\resources\app\src\command-registry.js:265:35)
    at C:\Users\Programação\AppData\Local\atom\app-1.19.2\resources\app\src\command-registry.js:3:65
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\Programação\AppData\Local\atom\app-1.19.2\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:610:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\Programação\AppData\Local\atom\app-1.19.2\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:401:28)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (C:\Users\Programação\AppData\Local\atom\app-1.19.2\resources\app\src\window-event-handler.js:100:42)
    at HTMLDocument.<anonymous> (C:\Users\Programação\AppData\Local\atom\app-1.19.2\resources\app\src\window-event-handler.js:3:65)
@mdeboer
Copy link

mdeboer commented Aug 30, 2017

Project directory C:/Users/Programação/.atom/packages/php-integrator-base/core/3.0.0/ is not empty.

Try this:

  1. Remove the php-integrator packages (delete their directories / use apm uninstall / through Atom)
  2. Clear your composer cache: composer clear-cache
  3. Install php-integrator packages again

That solved broken installations for me 👍

@kevingobert
Copy link

I have the same worries. I tried your solution it didn't work for me

@mdeboer
Copy link

mdeboer commented Aug 31, 2017

Did you get the same error?

@tjapro
Copy link
Author

tjapro commented Aug 31, 2017

@mdeboer:
I have done what you suggests, but I got the same message.
I am installing the php-integrator-base without Composer.

Error message:

Composer has errors to report: Installing php-integrator/core (3.0.0)

                                                                                                       
  [InvalidArgumentException]                                                                           
  Project directory C:/Users/Programação/.atom/packages/php-integrator-base/core/3.0.0/ is not empty.  

@mdeboer
Copy link

mdeboer commented Aug 31, 2017

Ah right, well afaik you need composer as much as you need PHP to run this. Why don't you install composer?

@Talv
Copy link

Talv commented Sep 1, 2017

He doesn't directly needs it. As fas as I can see php-integrator is downloading its own copy during installation. Also not sure if composer clear-cache is really needed in this case, but surely won't hurt.
What he clearly missed is step 1 from your guide.

@TJProgrammer
Composer won't install package to non-empty directory. So just wipe this directory C:/Users/Programação/.atom/packages/php-integrator-base/core/3.0.0/. And attempt installation again. But if it failed once, it will likely fail again if you don't find root cause. Because the fact that this directory is not empty says composer failed its previous installation due to some error that you must find and address.

@tjapro
Copy link
Author

tjapro commented Sep 1, 2017

@mdeboer : From php integrator wiki (https://github.com/php-integrator/atom-base/wiki/Help!-It-Doesn't-Work!):

You don't actually require Composer to install the core, it is downloaded and installed into a temporary folder automatically by the base package.

@Talv: I will try what you said. EDIT: Don't work.

@kevingobert
Copy link

I had a similar error. I updated composer and added the composer.json (https://gitlab.com/php-integrator/core/blob/development/composer.json) in the /core file and it works for me

@Gert-dev
Copy link
Owner

@Talv is correct, Composer is not actually required to be installed. It is automatically set up during installation of the core, see also the wiki.

Nonetheless I'm going to mark this as bug as I'm going to try and automatically remove the existing folder if it already exists.

Currently if the Composer core setup fails, the folder lingers around and the next installation it will complain about it not being empty.

@Gert-dev Gert-dev changed the title Cannot install core Automatically remove existing core folder on core installation Sep 16, 2017
@Gert-dev Gert-dev added the bug label Sep 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants