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

Windows 11 / Herd / Box Requirements Check Fails #350

Closed
delta1186 opened this issue Oct 3, 2024 · 9 comments
Closed

Windows 11 / Herd / Box Requirements Check Fails #350

delta1186 opened this issue Oct 3, 2024 · 9 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@delta1186
Copy link
Contributor

Background
It never fails when you want to do something easy it blows up in your face. This morning I was attempting to install the statamic cli tool composer global require statamic/cli and of course I got some dependency errors. So while troubleshooting I ended up breaking takeout. I removed all of my global composer packages except for laravel/installer which I ended up updating to 5.9. I did not have much installed.

"tightenco/takeout": "^2.3"
"laravel/installer": "^5.7",
"beyondcode/expose": "^2.6",
"tightenco/tlint": "^9.3"

So then after having just laravel/installer 5.9 installed I still could not install the statamic cli tool. I finally got it installed using
composer global require statamic/cli --with-all-dependencies

So now I started the process of restoring my other packages and the only one I was actually still using was takeout. Initially I just tried running the default composer command composer global require tightenco/takeout

But then I got the "pcntl" and "posix" dependencies errors because I am on Windows, 11 to be exact. Many moons ago these were ignored in the package's composer.json when I PR'd the navigation upgrades for Windows, but that has since been removed. So in order to get the package installed I just ran.
composer global require tightenco/takeout --ignore-platform-reqs
This got takeout installed and my global composer.json now has the following entries:

{
    "require": {
        "laravel/installer": "^5.9",
        "statamic/cli": "^3.2",
        "tightenco/takeout": "^2.8"
    }
}

Issue
Now on to the issue I am currently facing. When I try and run takeout start I get the following:

image

To be honest I have never run into this. I am not sure where the Box Requirement Checker lives. I am guessing that is a composer thing, but if it were one would think, composer global require tightenco/takeout --ignore-platform-reqs, would have prevented this, so I am really not sure at this point. I am going to continue my DYOR, but I wanted to go ahead and post something here to get that process started.

I will say that I also tried adding the following entries to my global composer.json, but takeout still gave the same error.

"config": {
  	"platform": {
    	"ext-pcntl": "8.3",
    	"ext-posix": "8.3"
  	}
 },
"platform-check": false,
    "platform": {
         "ext-pcntl": "8.3",
         "ext-posix": "8.3"
     },

Thanks in advance!

@tonysm
Copy link
Contributor

tonysm commented Oct 15, 2024

Hey @delta1186 have you tried installing the specific version you had before? Try this:

composer global require "tightenco/takeout:2.6"

This is just to test where the issue started happening. I'll take a look at the platform requirements stuff. That might be related to this change: #308

@delta1186
Copy link
Contributor Author

delta1186 commented Oct 15, 2024

I just tried that. I was using php8.3 globally, but changed that to 8.2 in Herd. I used the --ignore-platform-reqs the second try, but got a dependency conflict. I am guessing statamic or laravel installer using using 2.7 guzzle.

image

@tonysm
Copy link
Contributor

tonysm commented Oct 21, 2024

@delta1186 that could be the issue, I guess. I'll try to reproduce that later this week.

We're experimenting with a Docker-based Takeout experience (see #326), would you like to give it a shot? If so, you can remove the Takeout composer package and replace it with this alias (on your .bashrc, .zshrc, or whatever shell you're using):

alias takeout='docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -it tighten/takeout:latest'

Then you can use the alias just like you'd normally use Takeout. If you face any issues, just remove the alias. Let me know if you give it a try.

@tonysm tonysm self-assigned this Oct 21, 2024
@delta1186
Copy link
Contributor Author

@tonysm I just tried the docker alias. I am using Windows 11 terminal app so my alias entry look like the following.

doskey takeout="docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -it tighten/takeout:latest"

When I ran takeout command I got The filename, directory name, or volume label syntax is incorrect.

So I just tried to the run the raw command. docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -it tighten/takeout:latest and it did install the takeout docker image. However, I still get the same error when using the takeout alias.

@tonysm
Copy link
Contributor

tonysm commented Oct 21, 2024

I still get the same error when using the takeout alias.

You mean the same error as the original error? Same pcntl and posix requirements? That's odd. But not sure how Docker works if you're using it on Windows (not via WSL/2). Thanks for giving it a try.

I'll try to reproduce it locally installing statamic/cli and Takeout locally, but I don't run on Windows, so not sure if I'll be able to reproduce it (but I'll try!).

@tonysm tonysm added the help wanted Extra attention is needed label Oct 21, 2024
@vintagesucks
Copy link

Hey @delta1186 have you tried installing the specific version you had before? Try this:

composer global require "tightenco/takeout:2.6"

@delta1186 you had 2.3.0 installed before, as 2.3.1 or later will not run on Windows.

If you are installing from scratch, the following should work:

composer global require "tightenco/takeout:2.3.0"
composer global require laravel/installer
composer global require statamic/cli -W

You may need to add --ignore-platform-reqs as you did before (I have it ignored by default).

@tonysm
Copy link
Contributor

tonysm commented Dec 8, 2024

Btw, we're working on the Docker installation path, and we added some new instructions for Windows users. More specifically, the aliases change depending on which shell you're using:

On Windows 10, if you're using Bash, use:

alias takeout="docker run --rm -v //var/run/docker.sock:/var/run/docker.sock -it tighten/takeout:latest"

On Windows 10, if you're using PowerShell, use:

function takeout { docker run --rm -v //var/run/docker.sock:/var/run/docker.sock -it tighten/takeout:latest $args }

@tonysm
Copy link
Contributor

tonysm commented Dec 8, 2024

the current instructions mention Windows 10, but I guess they work for Windows 11 as well? Worth a shot

@delta1186
Copy link
Contributor Author

delta1186 commented Dec 8, 2024

So I am using the app called Terminal in windows 11. @tonysm I just added the powershell command to my aliases.bat file and boom with a bit of help from ChatGPT I am in business. This worked for me.

doskey takeout=powershell -Command "docker run --rm -v //var/run/docker.sock:/var/run/docker.sock -it tighten/takeout:latest $*"

I was able to start my existing containers from before I messed everything up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants