Why got error adding CoreUI to laravel app?

99 views Asked by At

I need to add CoreUI to my fresh laravel10 app and I got Starter template from https://coreui.io/docs/getting-started/introduction/#

and copypasted it into my resources/views/layouts/app.blade.php file and replace content block with

@yield('content')

and title with :

<title>{{ config('app.name', 'Laravel') }}</title>

so all file has :

<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Option 1: CoreUI for Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/@coreui/[email protected]/dist/css/coreui.min.css" rel="stylesheet" integrity="sha384-UkVD+zxJKGsZP3s/JuRzapi4dQrDDuEf/kHphzg8P3v8wuQ6m9RLjTkPGeFcglQU" crossorigin="anonymous">

    <!-- Option 2: CoreUI PRO for Bootstrap CSS -->
    <!-- <link href="https://cdn.jsdelivr.net/npm/@coreui/[email protected]/dist/css/coreui.min.css" rel="stylesheet" integrity="sha384-DN37sKXjXaUfTUzPFe9B4+RwDGdqbWhLExfnr8IeOt7w92aTL9JVv33fauH+K9Ok" crossorigin="anonymous"> -->

    <title>{{ config('app.name', 'Laravel') }}</title>
</head>
<body>
@yield('content')

<!-- Optional JavaScript; choose one of the two! -->

<!-- Option 1: CoreUI for Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/@coreui/[email protected]/dist/js/coreui.bundle.min.js" integrity="sha384-n0qOYeB4ohUPebL1M9qb/hfYkTp4lvnZM6U6phkRofqsMzK29IdkBJPegsyfj/r4" crossorigin="anonymous"></script>

<!-- Option 2: CoreUI PRO for Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/@coreui/[email protected]/dist/js/coreui.bundle.min.js" integrity="sha384-tU8pBuKH8C5qCFFE4VwJAI5CQPBhx1eOFhRGzWYJrXQ2+H1vjHfq2ljV2RLNGzHr" crossorigin="anonymous"></script>

<!-- Option 3: Separate Popper and CoreUI/CoreUI PRO  for Bootstrap JS -->
<!--
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity=" sha384-Xe+8cL9oJa6tN/veChSP7q+mnSPaj5Bcu9mPX5F5xIGE0DVittaqT5lorf0EI7Vk" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@coreui/[email protected]/dist/js/coreui.min.js" integrity="sha384-2hww80ziDjQXYpFulPf5tfdCCXLTxn70HdSwL9MfeEvpS0kjfHd1iaBRsLpnuaSC" crossorigin="anonymous"></script>
or
<script src="https://cdn.jsdelivr.net/npm/@coreui/[email protected]/dist/js/coreui.min.js" integrity="sha384-V9Xo/Ul3Ncvk/GYHzQKG6XA/nRynmiKho8yZYKfpmHr4q/8lUKVVL8Jz/ODLPpGt" crossorigin="anonymous"></script>
-->
</body>
</html>

I run

npm run dev

when when I run homepage I got error in browser's console : iled to find a valid digest in the 'integrity' attribute for resource

'https://cdn.jsdelivr.net/npm/@coreui/[email protected]/dist/js/coreui.bundle.min.js' with computed SHA-384 integrity 'SFBJAIfWcdppsEoquvhmUe9ddWiNdAaqm0G7rV/bKtsejsMiMXUNTErv88nTBogj'. The resource has been blocked.

and I see that CoreUI is not applyed in homepage.

How can I fix this error ?

0

There are 0 answers