neos / neos-development-collection

The unified repository containing the Neos core packages, used for Neos development.
https://www.neos.io/
GNU General Public License v3.0
260 stars 221 forks source link

BUG: Issues when installing the latest Neos on Windows #4356

Open eartahhj opened 1 year ago

eartahhj commented 1 year ago

Originally posted in https://github.com/neos/flow-development-collection/pull/3088#issuecomment-1602977390

Current Behavior

Today I tried installing Neos 6 times with more than 2 hours of debug but I keep finding issues everytime I try.

See "Steps to reproduce".

Expected Behavior

To be able to use Neos without having to solve all these issues manually every time.

Steps To Reproduce

1) composer create-project neos/neos-base-distribution neos Always ends with:

33 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
119 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> Neos\Flow\Composer\InstallerScripts::postUpdateAndInstall
Script Neos\Flow\Composer\InstallerScripts::postUpdateAndInstall handling the post-update-cmd event terminated with an exception

In ComposerUtility.php line 98:

  No composer manifest file found at "C:/Programs/laragon/www/neos/Packages/C:/Programs/laragon/www/neos/Packages/Application/Neos.Behat/composer.j
  son".

2) Went to C:\Programs\laragon\www\neos\Packages\Framework\Neos.Flow\Classes\Package\PackageManager.php and changed line 639 from: yield $potentialPackageDirectory; to: yield Files::getUnixStylePath($potentialPackageDirectory);

3) Modified the PHP path in Settings.yaml

3) php flow flow:core:compile php flow flow:cache:warmup

4) Navigated on the browser to /neos

5) Clicked on "Go to setup" and inserted the SetupPassword Screen is blank, can't do anything

6) The only way to make the setup via browser to work is to first launch in the command prompt:

php flow setup:database (pdo_mysql)
php flow setup:imagehandler (Imagick)
php flow doctrine:migrate

Only now the web setup starts working and it sends me to choose the Image Library image

7) But before doing that ... if I create a user with the command: php flow user:create --roles Administrator xxx yyy firstname lastname The user is created but the backend does not work: http://.../neos/content

Call to a member function getContext() on null
Exception Code  0
Exception Type  Error
Thrown in File  C:\Programs\laragon\www\neos\Data\Temporary\Development\Cache\Code\Flow_Object_Classes\Neos_Neos_Ui_Controller_BackendController.php
Line    222

8) The solution is to continue the setup via web, so I delete my cookies (logout) and go to /setup

9) I insert the SetupPassword and proceed.

10) I select Neos.Demo as Site package

At this point, if I created a package instead of just using the Neos.Demo package, I would get an error: image

Environment requirements not fulfilled
The specified path to your PHP binary (see Configuration/Settings.yaml) is incorrect or not a PHP command line (cli) version. 

So, for now I will go with the Neos.Demo package.

11) I login to the backend. It works but I cannot edit the contents of the pages because I have this error:

Invalid resource URI "nodetypes://Neos.Demo\Collection": Package "Neos.Demo\Collection" is not available.
Exception Code  1309269952
Exception Type  Neos\Flow\ResourceManagement\Exception
Log Reference   20230622182009078c95
Thrown in File  C:\Programs\laragon\www\neos\Data\Temporary\Development\Cache\Code\Flow_Object_Classes\Neos_Neos_ResourceManagement_NodeTypesStreamWrapper.php
Line    506

Nested Exception
Package "Neos.Demo\Collection" is not available.

Please check if the package exists and that the package key is correct (package keys are case sensitive).
Exception Code  1166546734
Exception Type  Neos\Flow\Package\Exception\UnknownPackageException
Log Reference   20230622182009c58bc5
Thrown in File  C:\Programs\laragon\www\neos\Packages\Framework\Neos.Flow\Classes\Package\PackageManager.php
Line    208

Toggle backtrace code

Instance root   C:/Programs/laragon/www/neos/
Application Context Development
Request Handler Neos\Flow\Http\RequestHandler

image

Environment

- Flow: Neos 8.3.3
- PHP: 8.1.0
- WebServer: Apache 2.4.54 on Laragon
- DBMS: MySQL 8.0.30
- OS: Windows 11

Anything else?

Worth to mention: Neos 8.2.5 seems to work much better on Windows, so far. At least, it worked for me with many less issues.

mhsdesign commented 1 year ago

As said already, thank you for your write down ;)

Point 1 and 2 is fixed via https://github.com/neos/flow-development-collection/pull/3088 (will be in the next bugfix release)

Step 11 seems to be about our new nodeTypes stream wrapper, which might not function correctly on windows. I extracted this into a new issue: https://github.com/neos/neos-development-collection/issues/4358