vite-web-extension icon indicating copy to clipboard operation
vite-web-extension copied to clipboard

bumped up crxjs/vite-plugin version

Open sukantamaikap opened this issue 11 months ago • 0 comments

Issue

Out of the box npm install results in the below error:

❯ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/vite
npm ERR!   dev vite@"^4.5.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"^2.9.0" from @crxjs/[email protected]
npm ERR! node_modules/@crxjs/vite-plugin
npm ERR!   dev @crxjs/vite-plugin@"^1.0.14" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /Users/sm/.npm/_logs/2024-02-29T10_17_08_971Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /Users/sm/.npm/_logs/2024-02-29T10_17_08_971Z-debug-0.log
❯ npm -v
10.2.4
❯ node -v
v21.6.2

Though, running it with --legacy-peer-deps resolves it, bumping up the version of crxjs/vite-plugin seems to be a cleaner solution. This error seems to be not expected as per this thread in chrome-extension-tools' discussion. On the other hand this open issue seems to confirm the need.

Changes Made:

Testing

  • Ran npm install and confirmed the above error is resolved.
  • Ran npm run dev and loaded the extension for a sanity test.
  • Ran npm run build for sanity test.

Disclaimer:

I'm quite new to node; my understanding of the ecosystem is quite superficial. Please correct me when and where I'm wrong.

sukantamaikap avatar Feb 29 '24 11:02 sukantamaikap