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

ReferenceError: _ is not defined #55

Closed
pasxel opened this issue Nov 14, 2022 · 2 comments
Closed

ReferenceError: _ is not defined #55

pasxel opened this issue Nov 14, 2022 · 2 comments

Comments

@pasxel
Copy link
Contributor

pasxel commented Nov 14, 2022

Added comments are not showing. I can see in browser console error ReferenceError: _ is not defined.
Package version: 4.0.0
Laravel: 9.31
Laravel Nova: 4.15.1

Looks like problem with lodash importing.

Steps for reproducing:

  1. composer require kirschbaum-development/nova-comments
  2. Run migration: php artisan migrate
  3. Adding use Commentable; to Model.
  4. Adding to Nova resource :
public function fields(Request $request)
    {
        return [
            // ...
            HasMany::make('Comments', 'comments', Comment::class)
                ->hideFromDetail()
                ->hideFromIndex(),
            Commenter::make(),
          //
          ];
  1. Go to Resource and add any comment.
  2. As a result, Comments block will be empty and browser console shows ReferenceError: _ is not defined
@pasxel
Copy link
Contributor Author

pasxel commented Nov 14, 2022

I have added PR with possible fix #56

adammparker added a commit that referenced this issue Nov 17, 2022
Issue #55. Add lodash to webpack.ProvidePlugin
@adammparker
Copy link
Member

Resolved in 4.0.1, thanks!

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

No branches or pull requests

2 participants