Skip to content

laravel mix/webpack ERROR Module not found: Error: Can't resolve 'jquery' #553

Open
@jayenne

Description

@jayenne

Hi,
I'm using a clean Laravel install and using Packery with vanilla Javascript (sans Jquery).
It works perfectly using a cdn include but when I replace that script with an NPM require if fails:

ERROR in ./node_modules/packery/dist/packery.pkgd.min.js Module not found: Error: Can't resolve 'jquery' in '/var/www/jetstream/node_modules/packery/dist'

I simply install via NPM
then add mix.js('node_modules/packery/dist/packery.pkgd.min.js','public/js') to my webpack.mix.js
When I npm run dev it fails with the error above.

Is this to be expected?
Do I really need jQuery for it to compile?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions