livewire-charts-demo icon indicating copy to clipboard operation
livewire-charts-demo copied to clipboard

Unable to Install

Open abbasmashaddy72 opened this issue 1 year ago • 1 comments

PHP Version: 8.2.6

Showing Error: Problem 1 - Root composer.json requires laravel/framework 8.10.0 -> satisfiable by laravel/framework[v8.10.0]. - laravel/framework v8.10.0 requires php ^7.3 -> your php version (8.2.6) does not satisfy that requirement.

abbasmashaddy72 avatar Jun 11 '23 05:06 abbasmashaddy72

Made these Changes in composer.json file

    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.3|^7.4|^8.0|^8.1",
        "asantibanez/livewire-charts": "^2.0.0",
        "fideloper/proxy": "^4.2",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.5",
        "laravel/framework": "^9.46",
        "laravel/tinker": "^2.7.3"
    },
    "require-dev": {
        "spatie/laravel-ignition": "^1.6.4",
        "fzaninotto/faker": "^1.9.1",
        "mockery/mockery": "^1.5.1",
        "nunomaduro/collision": "^6.4",
        "phpunit/phpunit": "^9.3"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}

Also Made Changes in TrustProxies.php

<?php

namespace App\Http\Middleware;

use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request;

class TrustProxies extends Middleware
{
    /**
     * The trusted proxies for this application.
     *
     * @var array|string|null
     */
    protected $proxies;

    /**
     * The headers that should be used to detect proxies.
     *
     * @var int
     */
    protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB;
}

It Got Installed but error in app.js of livewire charts

app.js:2 Uncaught TypeError: Cannot read properties of undefined (reading 'name')
    at Proxy.drawChart (app.js:2:479344)
    at app.js:2:478836
drawChart @ app.js:2
(anonymous) @ app.js:2
setTimeout (async)
init @ app.js:2
eval @ VM1019:3
d.el @ alpine.js:144
d @ alpine.js:131
f @ alpine.js:139
evaluateReturnExpression @ alpine.js:1754
be @ alpine.js:1510
initializeComponent @ alpine.js:1911
(anonymous) @ alpine.js:1856
(anonymous) @ alpine.js:1870
discoverComponents @ alpine.js:1869
start @ alpine.js:1855
await in start (async)
(anonymous) @ alpine.js:1940
(anonymous) @ (index):197
dispatch @ dispatch.js:6
value @ index.js:92
(anonymous) @ (index):213
app.js:2 Uncaught TypeError: Cannot read properties of undefined (reading 'name')
    at Proxy.drawChart (app.js:2:483037)
    at app.js:2:482496
drawChart @ app.js:2
(anonymous) @ app.js:2
setTimeout (async)
init @ app.js:2
eval @ VM1023:3
d.el @ alpine.js:144
d @ alpine.js:131
f @ alpine.js:139
evaluateReturnExpression @ alpine.js:1754
be @ alpine.js:1510
initializeComponent @ alpine.js:1911
(anonymous) @ alpine.js:1856
(anonymous) @ alpine.js:1870
discoverComponents @ alpine.js:1869
start @ alpine.js:1855
await in start (async)
(anonymous) @ alpine.js:1940
(anonymous) @ (index):197
dispatch @ dispatch.js:6
value @ index.js:92
(anonymous) @ (index):213
app.js:2 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length')
    at app.js:2:340130
    at e (app.js:2:340192)
    at Object.t [as generate] (app.js:2:341189)
    at t.value (app.js:2:341874)
    at t.value (app.js:2:356544)
    at t.value (app.js:2:460731)
    at t.create (app.js:2:4700)
    at app.js:2:459203
    at new Promise (<anonymous>)
    at t.value (app.js:2:458696)

Charts Not Rendering, Tried to push the assets again same issue

@asantibanez @Shelob9

abbasmashaddy72 avatar Jun 13 '23 00:06 abbasmashaddy72

Closed as now using Filamnet

abbasmashaddy72 avatar Jun 15 '24 22:06 abbasmashaddy72