crxjs / chrome-extension-tools

Bundling Chrome Extensions can be pretty complex. It doesn't have to be.
https://crxjs.dev/vite-plugin
2.75k stars 182 forks source link

@crxjs/vite-plugin@2.0.0-beta.1 does not fix peerDependencies issue #535

Closed promethyttrium closed 1 year ago

promethyttrium commented 1 year ago

Build tool

Vite

Where do you see the problem?

Describe the bug

Cannot install @crxjs/vite-plugin@2.0.0-beta.1 due to 'Could not resolve dependency' error.

Reproduction

As per the getting start guide:

Error!

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: vite-template-solid@0.0.0
npm ERR! Found: vite@3.1.8
npm ERR! node_modules/vite
npm ERR!   dev vite@"^3.1.7" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"^2.9.0 <= ^3.1.7" from @crxjs/vite-plugin@2.0.0-beta.1
npm ERR! node_modules/@crxjs/vite-plugin
npm ERR!   dev @crxjs/vite-plugin@"2.0.0-beta.1" 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.

Content of the package.json for the solidjs project

{
  "name": "vite-template-solid",
  "version": "0.0.0",
  "description": "",
  "scripts": {
    "start": "vite",
    "dev": "vite",
    "build": "vite build",
    "serve": "vite preview"
  },
  "license": "MIT",
  "devDependencies": {
    "typescript": "^4.8.2",
    "vite": "^3.1.7",
    "vite-plugin-solid": "^2.3.0"
  },
  "dependencies": {
    "solid-js": "^1.5.1"
  }
}

Logs

No response

System Info

System:
    OS: Windows 10 10.0.19043
    CPU: (12) x64 Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
    Memory: 7.32 GB / 15.90 GB
  Binaries:
    Node: 16.10.0 - C:\Program Files\nodejs\node.EXE
    npm: 7.24.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 106.0.5249.119
    Edge: Spartan (44.19041.1266.0), Chromium (106.0.1370.42)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    vite: ^3.1.7 => 3.1.7

Severity

blocking all usage of RPCE

jacksteamdev commented 1 year ago

The peer deps problem should be fixed in the current beta release (v2.0.0-beta.2):

npm i -D @crxjs/vite-plugin@beta