Skip to content

Module not found: Error: Package path ./dist/pjax.esm.js is not exported from package #239

@Yahav

Description

@Yahav

Describe the bug

After upgrading to Laravel Mix 6/PostCSS 8/Webpack 5.
When trying to comple i'm getting the following error:

ERROR in ./resources/js/services/sliphuaPjax.js 7:0-50
Module not found: Error: Package path ./dist/pjax.esm.js is not exported from package C:\projectName\node_modules\@sliphua\pjax (see exports field in C:\projectName\node_
modules\@sliphua\pjax\package.json)

At /resources/js/services/sliphuaPjax.js i simply import the package as stated at the docs:
import Pjax from '@sliphua/pjax/dist/pjax.esm.js

It used to work perfectly up until the point in which i've upgraded Laravel Mix/Webpack.

To reproduce

No response

Expected behavior

No response

Environment

- OS: Windows 10
- Browser: Not relevant
- Pjax: Latest

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions