Npm run watch is compiling but I can’t load page

I am using Laravel 8 + Vue. When I use php artisan serve it loads … Read more Npm run watch is compiling but I can’t load page

I am using Laravel 8 + Vue.

When I use php artisan serve it loads my page on http://127.0.0.1:8000. But when I use
npm run watch it compiles (I get notification every time I change my code that it compiles successfully) but I can’t reach my page.

This site can’t be reached
127.0.0.1 refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

My package.json file:

    "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": {
        "axios": "^0.21",
        "bootstrap": "^4.6.0",
        "cross-env": "^7.0.3",
        "jquery": "^3.6",
        "laravel-mix": "^6.0.6",
        "lodash": "^4.17.19",
        "popper.js": "^1.16.1",
        "postcss": "^8.1.14",
        "resolve-url-loader": "^3.1.2",
        "sass": "^1.32.11",
        "sass-loader": "^11.0.1",
        "vue": "^2.6.12",
        "vue-loader": "^15.9.7",
        "vue-template-compiler": "^2.6.12",
        "webpack-dev-server": "^4.3.1"
    },
    "dependencies": {
        "npm-watch": "^0.11.0",
        "vue-router": "^3.5.2",
        "watch": "^1.0.2"
    }
}

Source: Vue – Stack Overflow


Categories: NewsTags: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *