Kaishiyoku / manga-organizer

A self-hostable, simple web service to keep track of your owned mangas.
https://mangas.kaishi.de
9 stars 2 forks source link

Can't install with in AAPANEL #104

Open GenzPN opened 1 year ago

GenzPN commented 1 year ago

Hi i use AAPANEL to install manga but i still have error when i install Command: composer install --no-dev --no-scripts

PHP Fatal error:  Uncaught Error: Call to undefined function Composer\XdebugHandler\putenv() in phar:///usr/bin/composer/vendor/composer/xdebug-handler/src/Process.php:97
Stack trace:
#0 phar:///usr/bin/composer/vendor/composer/xdebug-handler/src/Status.php(59): Composer\XdebugHandler\Process::setEnv()
#1 phar:///usr/bin/composer/vendor/composer/xdebug-handler/src/XdebugHandler.php(101): Composer\XdebugHandler\Status->__construct()
#2 phar:///usr/bin/composer/bin/composer(23): Composer\XdebugHandler\XdebugHandler->__construct()
#3 /usr/bin/composer(29): require('...')
#4 {main}
  thrown in phar:///usr/bin/composer/vendor/composer/xdebug-handler/src/Process.php on line 97

Fatal error: Uncaught Error: Call to undefined function Composer\XdebugHandler\putenv() in phar:///usr/bin/composer/vendor/composer/xdebug-handler/src/Process.php:97
Stack trace:
#0 phar:///usr/bin/composer/vendor/composer/xdebug-handler/src/Status.php(59): Composer\XdebugHandler\Process::setEnv()
#1 phar:///usr/bin/composer/vendor/composer/xdebug-handler/src/XdebugHandler.php(101): Composer\XdebugHandler\Status->__construct()
#2 phar:///usr/bin/composer/bin/composer(23): Composer\XdebugHandler\XdebugHandler->__construct()
#3 /usr/bin/composer(29): require('...')
#4 {main}
  thrown in phar:///usr/bin/composer/vendor/composer/xdebug-handler/src/Process.php on line 97
Kaishiyoku commented 1 year ago

Hello, thanks for submitting. I will take a look into this as soon as I can.

Which version of PHP are you using?

GenzPN commented 1 year ago

I use PHP 8.0.26 image

Kaishiyoku commented 1 year ago

It looks like the putenv function has been disabled with aaPanel. You should be able to enable it at "Disabled functions".

I could reproduce the exception with disabling the putenv function in the php.ini file.

https://forum.aapanel.com/d/3299-composer-error/3

GenzPN commented 1 year ago

I was fix disable and enable fileinfo. And now i have new error.

root@genzpn:/www/wwwroot/manga.genzpn.com# /www/server/php/80/bin/php artisan user:create

   ERROR  There are no commands defined in the "user" namespace.

root@genzpn:/www/wwwroot/manga.genzpn.com#

I have suck when i create user

Kaishiyoku commented 1 year ago

Ah, I have renamed the command some time ago...I forgot to adjust the README accordingly.

The new command is as follows:

php artisan make:user

GenzPN commented 1 year ago

So yeah now i can create new user but got a new error

root@genzpn:~# cd /www/wwwroot/manga.genzpn.com
root@genzpn:/www/wwwroot/manga.genzpn.com# npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'laravel-vite-plugin@0.7.2',
npm WARN EBADENGINE   required: { node: '>=14' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'postcss-import@15.1.0',
npm WARN EBADENGINE   required: { node: '>=14.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'rollup@3.7.4',
npm WARN EBADENGINE   required: { node: '>=14.18.0', npm: '>=8.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'vite@4.0.2',
npm WARN EBADENGINE   required: { node: '^14.18.0 || >=16.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }

up to date, audited 100 packages in 3s

19 packages are looking for funding
  run `npm fund` for details

1 high severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
root@genzpn:/www/wwwroot/manga.genzpn.com# 

Ah so this is some error in npm ??

Kaishiyoku commented 1 year ago

Yes. Some npm packages require Nodejs 14 or higher. The latest LTS version of Nodejs is 18. I would recommend to update Nodejs to version 18.