Problems installing Composer

I’ve just re-opened this project and git is showing 2,900+ files removed from the aws and stripe folders within dmxConnectLib/aws and dmxConnectLib/stripe and those folders have indeed been removed.

Also, I saw an error in the Output window in Wappler about composer being missing but I sadly didn’t take a screenshot and now I can’t see it again.

What’s the scenario? Should I now delete the aws and stripe folders from the hosting server? I’m not (yet) using Stripe on this particular project but I am relying on it for aws (Wasabi).

Can you let me know what I should do as I don’t want to break anything?

Cheers.

UPDATE: I’ve found how to re-run the composer installation so this is what I’m seeing:

Installing PHP Packages ...
zsh:1: command not found: composer
Error Installing PHP Packages!

And I’m now using v5.6.1. (MacOS M1)

try to run system check on this project, then it should also install composer if it is selected in your project options.

Will improve it also that it auto installs when not found.

Thanks @George.

I’ve run a system check and it spent a good couple of minutes downloading loads of stuff, most of which I’ve never heard of! I’m not running the local PHP server, I use either MAMP or a dev server so why do I need to download all that?

At the end of it it installed Composer but I still don’t have the aws folder in dmxConnectLib. I’ve opened and resaved the page which uses the S3 uploading to Wasabi but that hasn’t put the files there.

What should happen? I can’t help thinking this is quite a step back compared to how it was before. I only needed to be able to keep the version of the aws files which worked rather than what Wappler was putting there.

Help!

All the installs you saw were probably installing Homebrew - the automatic installer of all system packages we use. This is needed once and from now on everything will go smoothly.

Composer packages are installed under /vendor folder and not dmxConnectLib

So the later is actually getting cleared and all composer packages go under /vendor

Thanks for explaining, @George. Good to hear that the mass download is only done once.

I can’t find a vendor folder anywhere in the project files. When is it created?

I’m at a bit of a loss here. All the aws files were deleted but I just can’t see to get the new ones so if I publish then it will all break. And it’s a project I’m actively working on at the moment.

Normally if you enable composer or open a project using composer, then the composer packages installw will kicks in automatically, but as you installed composer later on, you can just run the “Install PHP Packages” from the bottom toolbar manually:

Excellent. Thanks again.

It’s giving this error:

Installing PHP Packages ...
Composer could not find a composer.json file in /Users/jon/Wappler Projects/xxxxx
To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage
Error Installing PHP Packages!

I recall seeing that file yesterday and I deleted it in the hope it would trigger an attempt to reinstall Composer. It contained a min PHP version from memory. Can you send me what it should be and I’ll put it back?

OK, I’ve created a new test project and set it to use Composer. This has given me the file which I’ve copied to the real project. The /vendor folder has now been populated but there’s only a composer folder within it, nothing for aws/S3. I’ve opened the page which has the S3 upload on it and re-saved it but it’s not creating anything.

What else should I do?

@George, can you help me with this?

Maybe just go to your project options and check that “use compose” is on and then save them. Then the composer.json should be generated.

Thanks @George. I’ve manually put in the composer.json file by setting up another project and switching on Composer.

But… the aws files just aren’t being created. The vendor folder only contains composer files in a composer folder:

Should the aws files be put in there? I daren’t upload anything until I know it’s all as it should be.

the aws files will be auto added to your composer.json when you have an s3 connection defined globally in server connect

I already have the s3 connection defined globally so have opened it and saved it again but nothing has been added. My composer.json file just has this:

{
  "require": {
    "php": ">=5.6",
    "ext-curl": "*",
    "ext-gd": "*",
    "ext-hash": "*",
    "ext-json": "*",
    "ext-mbstring": "*",
    "ext-openssl": "*",
    "ext-pcre": "*",
    "ext-pdo": "*",
    "ext-session": "*"
  },
  "config": {
    "platform": {
      "php": "5.6.0"
    },
    "platform-check": true
  }
}

I really need to get this running properly.

@George, I’ve just created another S3 connection server connect globals but it’s still not creating the files. And no change to the composer.json file.

how is your project folder structure setup? could you see the files of the global files s3 connector?

Where should I see those files?

Well just make screenshot from your file manager with expanded dmxConnect/modules/s3

Thanks @George. This is what I have:

Screenshot 2023-05-13 at 12.07.44

Thanks Jon, I’ve found the problem for not auto adding the aws module to composer.json

Will fix it in the next update.

You can try to re-save the project settings, might help also.

1 Like