'laravel not load resources
I have a project, the caul all the operative part works. But when displaying images, loading resources, the elements are recognized by the browser, they are transferred, but they are not read. navegator net log
I have reinstalled laravel, composer, npm and nothing works. The result is the same.
composer.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laracasts/flash": "^3.2",
"laravel/framework": "^8.65",
"laravel/sanctum": "^2.11",
"laravel/tinker": "^2.5",
"laravel/ui": "^3.4",
"laravelcollective/html": "^6.2",
"phpmailer/phpmailer": "^6.5",
"yajra/laravel-datatables-oracle": "~9.0"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/breeze": "^1.5",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^5.10",
"phpunit/phpunit": "^9.5.10"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover":
[
"laravel/dusk"
]
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
package.json
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
},
"devDependencies": {
"@popperjs/core": "^2.10.2",
"@tailwindcss/forms": "^0.2.1",
"alpinejs": "^3.4.2",
"autoprefixer": "^10.1.0",
"axios": "^0.21",
"bootstrap": "^5.1.3",
"lodash": "^4.17.19",
"postcss": "^8.2.1",
"postcss-import": "^12.0.1",
"resolve-url-loader": "^4.0.0",
"sass": "^1.32.11",
"sass-loader": "^11.1.1",
"tailwindcss": "^2.0.2"
},
"dependencies": {
"esrecurse": "^4.3.0",
"internal-ip": "^7.0.0",
"querystring": "^0.2.1"
}
}
The app.js is not loading me either console log
Solution 1:[1]
The problem persisted, I had to lower the laravel version to 7, install nodejs version 16, npm version 8.
Remove directories: node_modules and vendor. Delete the files: package-lock.json and composer.lock
Then run: composer install npm install && npm run dev
I upgraded to Laravel version 8 composer update (resolve all dependencies) npm install && npm run dev
And there it worked.
Solution 2:[2]
Update your laravel-mix
npm install laravel-mix@latest
Clean npm install
npm clean-install
Then run
npm install && npm run dev
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Luis Roberto Macias Alejos |
| Solution 2 |
