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

Vite version 3 causes dependency error #451

Closed chasebank closed 2 years ago

chasebank commented 2 years ago

Build tool

Vite

Where do you see the problem?

Describe the bug

Getting started guide advises using npm init vite@latest which now points to v3, released a few days ago.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: package@0.0.0
npm ERR! Found: vite@3.0.0
npm ERR! node_modules/vite
npm ERR!   dev vite@"^3.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"^2.9.0" from @crxjs/vite-plugin@1.0.12
npm ERR! node_modules/@crxjs/vite-plugin
npm ERR!   dev @crxjs/vite-plugin@"*" from the root project

Forcing vite@2.9.14 fixes for now

Reproduction

https://crxjs.dev/vite-plugin/getting-started/vanilla-js/create-project

Logs

No response

System Info

{
  "code": "ERESOLVE",
  "current": {
    "name": "vite",
    "version": "3.0.0",
    "whileInstalling": {
      "name": "package",
      "version": "0.0.0",
      "path": "/home/chase/dev/"
    },
    "location": "node_modules/vite",
    "isWorkspace": false,
    "dependents": [
      {
        "type": "dev",
        "name": "vite",
        "spec": "^3.0.0",
        "from": {
          "location": "/home/chase/dev/"
        }
      }
    ]
  },
  "currentEdge": {
    "type": "dev",
    "name": "vite",
    "spec": "^3.0.0",
    "from": {
      "location": "/home/chase/dev/"
    }
  },
  "edge": {
    "type": "peer",
    "name": "vite",
    "spec": "^2.9.0",
    "error": "INVALID",
    "from": {
      "name": "@crxjs/vite-plugin",
      "version": "1.0.12",
      "whileInstalling": {
        "name": "package",
        "version": "0.0.0",
        "path": "/home/chase/dev/"
      },
      "location": "node_modules/@crxjs/vite-plugin",
      "isWorkspace": false,
      "dependents": [
        {
          "type": "dev",
          "name": "@crxjs/vite-plugin",
          "spec": "*",
          "from": {
            "location": "/home/chase/dev/"
          }
        }
      ]
    }
  },
  "strictPeerDeps": false,
  "force": false
}

Severity

blocking all usage of RPCE

BurtHarris commented 2 years ago

@jacksteamdev I think this issue seems to remain. I just reproduced it using create-vite@3.0.2 simple-ts and @crxjs\vite-plugin latest.