joelbutcher / socialstream

OAuth for Laravel, simplified.

Home Page:https://docs.socialstream.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cloned working git repository with socialstream does not see jetstream components

clarkrickman2 opened this issue · comments

Am I missing something simple? I've beat my head against this for hours. Thank-you!

Steps to reproduce the behavior:

  1. Create a new laravel project
  2. Install and setup socialstream per instructions and verify everything is working properly
  3. Commit everything to github
  4. Clone repository on another developer's machine
  5. Composer install && npm install && npm run dev
  6. Go to login screen and see error "Unable to locate a class or view for component [authentication-card-logo]."

I understand socialstream like jetstream can only be installed on a new project.

Environment context

  • Socialstream version: 3.9.2
  • Jetstream stack: Livewire
  • Laravel version: 9.52.7
  • PHP version: 8.2.6

@clarkrickman2 can you confirm this only occurs when you've installed socialstream, and not when you've only installed Jetstream?

@joelbutcher Hi! Yes! I have several other projects with Jetstream without this issue.

@clarkrickman2 I'm going to try and replicate the problem – can you answer the following questions, please?

Create a new laravel project
Where you using composer create-project or laravel new to achieve this?

  1. Commit everything to github
  2. Clone repository on another developer's machine

What tool were you using to interact with Git? If you were using the CLI, can you provide the exact commands you used?

git init
git remote add origin ---remote repository URL---
git add *
git commit -m "message"
git push origin main

then on dev machine

git clone ---remote repository url---

then on dev machine

git clone ---remote repository url---

@clarkrickman2 just tried to reproduce the issue, uploaded a project to a private repo, and cloned it -in the same machine, but different directory-, I didn't encounter any issue.

Socialstream's usage of Jetstream's components is mild and default (it doesn't touch the original Jetstream components, e.g: authentication-card-logo), see:

<x-guest-layout>
<x-authentication-card>
<x-slot name="logo">
<x-authentication-card-logo />
</x-slot>
<x-validation-errors class="mb-4" />

Needless to say, after cloning, I had to:

composer install
composer run post-root-package-install
composer run post-create-project-cmd
npm install
npm run dev
If you run " git ls-files | grep views/components " the output should looks like:
resources/views/components/action-link.blade.php
resources/views/components/action-message.blade.php
resources/views/components/action-section.blade.php
resources/views/components/application-logo.blade.php
resources/views/components/application-mark.blade.php
resources/views/components/authentication-card-logo.blade.php
resources/views/components/authentication-card.blade.php
resources/views/components/banner.blade.php
resources/views/components/button.blade.php
resources/views/components/checkbox.blade.php
resources/views/components/confirmation-modal.blade.php
resources/views/components/confirms-password.blade.php
resources/views/components/connected-account.blade.php
resources/views/components/danger-button.blade.php
resources/views/components/dialog-modal.blade.php
resources/views/components/dropdown-link.blade.php
resources/views/components/dropdown.blade.php
resources/views/components/form-section.blade.php
resources/views/components/input-error.blade.php
resources/views/components/input.blade.php
resources/views/components/label.blade.php
resources/views/components/modal.blade.php
resources/views/components/nav-link.blade.php
resources/views/components/responsive-nav-link.blade.php
resources/views/components/secondary-button.blade.php
resources/views/components/section-border.blade.php
resources/views/components/section-title.blade.php
resources/views/components/socialstream-icons/bitbucket.blade.php
resources/views/components/socialstream-icons/facebook.blade.php
resources/views/components/socialstream-icons/github.blade.php
resources/views/components/socialstream-icons/gitlab.blade.php
resources/views/components/socialstream-icons/google.blade.php
resources/views/components/socialstream-icons/linkedin.blade.php
resources/views/components/socialstream-icons/twitter.blade.php
resources/views/components/socialstream.blade.php
resources/views/components/switchable-team.blade.php
resources/views/components/validation-errors.blade.php
resources/views/components/welcome.blade.php

I'm closing this as I could not replicate this issue with the following steps using two laptops; one personal, one dev.

On the personal laptop

  1. Create a new repository on GitHub blog-test
  2. composer create-project laravel/laravel:9.52.7 blog
  3. cd blog
  4. composer require joelbutcher/socialstream:^3.9.2
  5. php artisan socialstream:install --stack=livewire --teams --api --verification --pest
  6. git init
  7. git add .
  8. git commit -m "initial commit"
  9. git remote add origin git@github.com:joelbutcher/blog-test.git
  10. git push -u origin main

On the dev laptop (w/ posgres)

  1. cd ~/Projects
  2. valet park
  3. git clone git@github.com:joelbutcher/blog-test.git
  4. cd blog-test
  5. composer install
  6. npm install && npm run dev
  7. createdb laravel
  8. cp .env.example .env
  9. php artisan key:generate
  10. vim .env set the following vars:
-APP_URL=http://localhost
+APP_URL=http://blog-test.test

-DB_CONNECTION=mysql
+DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
-DB_PORT=3306
+DB_PORT=5432
DB_DATABASE=laravel
-DB_USERNAME=root
+DB_USERNAME=postgres
DB_PASSWORD=
  1. php artisan migrate
  2. Open Chrome and visit http://blog-test.test/login:
screenshot

Thank you! I apologize and appreciate your time. I am sure I have something mucked up. Great work!

@clarkrickman2 You're very welcome.

If you use Socialstream extensively and you'd like to show you're appreciation (and are able to!), please consider sponsoring me and my work from as little as a cup of coffee /month - it would me the world and get me a step closer to being able to work on providing high quality Laravel packages more often!