Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node dependency installation fails during Laravel Reverb setup #207

Closed
JsExpertCoder opened this issue Jun 7, 2024 · 3 comments
Closed

Comments

@JsExpertCoder
Copy link

Reverb Version

@beta

Laravel Version

^11.9

PHP Version

^8.2

Description

When installing Laravel Reverb via the php artisan install:broadcasting command, the installation process fails at the Node dependency installation step. The error message indicates a missing script: "build". This issue prevents the completion of the broadcasting setup. Additionally, neither the package.json file nor the node_modules folder is created during this process.

Steps To Reproduce

Steps To Reproduce

  1. Create a new Laravel project:
    laravel new project_name
  2. Run the broadcasting installation command:
    php artisan install:broadcasting
  3. Choose to install Laravel Reverb when prompted.

Observed Behavior:

The installation proceeds until the Node dependencies are being installed. The process stops with the following error message:
npm ERR! Missing script: "build"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run

npm ERR! A complete log of this run can be found in: parth_to_logs
WARN Node dependency installation failed. Please run the following commands manually: npm install --save-dev laravel-echo pusher-js && npm run build.

Expected Behavior:

The Node dependencies should be installed successfully, and the broadcasting setup should complete without any errors.

@JsExpertCoder
Copy link
Author

JsExpertCoder commented Jun 7, 2024

the reason is the Breeze starter kit which excludes or doesn't even bring the "package.json" and "node_modules", so the node dependency installation fails during Laravel Reverb configuration

@crynobone
Copy link
Member

https://github.com/laravel/framework/blob/c632b1f4435e46229eef6b2b0ae9950925057f76/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php#L175-L177

Wouldn't it already be possible to run --without-node? and you should already be prompt to run node installation.

@driesvints
Copy link
Member

Closing this issue because it's inactive, already solved, old or not relevant anymore. Feel to open up a new issue if you're still experiencing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants