0

Im new to Laravel and wanted to use breeze authentication in my Laravel app. I created my project and migrate my database tables then based on breeze tutorial I run

composer require laravel/breeze --dev

and

php artisan breeze:install

successfully. but I got these errors after running this code

npm install && npm run dev

and now its the result. can anyone help me?

F:\kishcharkh>npm install && npm run dev

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7(node_modules\chokidar\node_modules\fsevents):

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Invalid protocol: 127.0.0.1:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2
(node_modules\watchpack\node_modules\chokidar\node_modules\fsevents):

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Invalid protocol: 127.0.0.1:
> @ dev F:\kishcharkh

> npm run development

> @ development F:\kishcharkh
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js

        Additional dependencies must be installed. This will only take a moment.

        Running: npm install vue-template-compiler --save-dev --production=false

npm ERR! Invalid protocol: 127.0.0.1:

npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\masih\AppData\Roaming\npm-cache\_logs\2021-01-12T09_52_45_253Z-debug.log
F:\kishcharkh\node_modules\webpack-cli\bin\cli.js:93
                                throw err;
                                ^

Error: Command failed: npm install vue-template-compiler --save-dev --production=false
npm ERR! Invalid protocol: 127.0.0.1:

npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\masih\AppData\Roaming\npm-cache\_logs\2021-01-12T09_52_45_253Z-debug.log

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the @ development script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\masih\AppData\Roaming\npm-cache\_logs\2021-01-12T09_52_45_353Z-debug.log

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! @ dev: `npm run development`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the @ dev script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

and here is the package.json file:

    "private": true,
    "scripts": {
        "dev": "npm run development",
        "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch": "npm run development -- --watch",
        "watch-poll": "npm run watch -- --watch-poll",
        "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
        "prod": "npm run production",
        "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --config=node_modules/laravel-mix/setup/webpack.config.js"
    },
    "devDependencies": {
        "@tailwindcss/forms": "^0.2.1",
        "alpinejs": "^2.7.3",
        "autoprefixer": "^10.1.0",
        "axios": "^0.19",
        "cross-env": "^7.0",
        "laravel-mix": "^5.0.1",
        "lodash": "^4.17.19",
        "postcss": "^8.2.1",
        "postcss-import": "^12.0.1",
        "resolve-url-loader": "^3.1.0",
        "tailwindcss": "^2.0.2"
    }
}
5
  • 1
    Could you edit your question to include your package.json file? The log looks like there may be some garbage in the file.
    – cbr
    Jan 12, 2021 at 11:14
  • Maybe 127.0.0.1:port for a url that needs to be prefixed by http://
    – Matt
    Jan 12, 2021 at 11:19
  • Do you have a proxy set up? Does npm config get proxy and npm config get https-proxy return null?
    – cbr
    Jan 12, 2021 at 11:30
  • yes , both returned null. @cbr Jan 12, 2021 at 11:32
  • Try deleting node_modules and running npm install --verbose. Does it reveal anything new?
    – cbr
    Jan 12, 2021 at 11:34

1 Answer 1

0

I did fight with that one day ago. I discoverd that if the error persist after of:

rm -rf node_modules rm package.lock.json npm cache clear --force npm install npm run dev

Then the error was that my node was outdated. Update to lastest version

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.