Skip to content

[plugin vite:dep-scan] Failed to resolve entry for package "x". The package may have incorrect main/module/exports specified in its package.json. #11997

Answered by malinhanak
malinhanak asked this question in Q&A
Discussion options

You must be logged in to vote

To update this thread I finally solved this by adding a resolve alias to the config pointing to the commonjs package in the node_modules.

resolve: {
    alias: {
      "package name": "package commonjs file path in node_modules",
    },
  },

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by malinhanak
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants