Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken examples after #11158 #11190

Closed
7 tasks done
fvsch opened this issue Dec 5, 2022 · 8 comments
Closed
7 tasks done

Broken examples after #11158 #11190

fvsch opened this issue Dec 5, 2022 · 8 comments

Comments

@fvsch
Copy link

fvsch commented Dec 5, 2022

Describe the bug

PR #11158 updated a few example's package.json to use alpha versions of some Vite plugins. This breaks the vue and vue-ts examples linked at:
https://vitejs.dev/guide/#trying-vite-online

$ vite
failed to load config from /home/projects/vitejs-vite-lrnemy/vite.config.js
error when starting dev server:
file:///home/projects/vitejs-vite-lrnemy/node_modules/@vitejs/plugin-vue/dist/index.mjs:2
import { isCSSRequest, normalizePath as normalizePath$1, transformWithEsbuild, formatPostcssSourceMap, createFilter } from 'vite';
         ^^^^^^^^^^^^
SyntaxError: The requested module 'vite' does not provide an export named 'isCSSRequest'
    at _instantiate (https://vitejsvitelrnemy-o15z.w-corp.staticblitz.com/blitz.b6c96f782a49b3e017dca41830943768f8acbe40.js:6:986481)

I tried a few different versions of @vitejs/plugin-vue:

  • 3.2.0 -> works
  • 4.0.0-alpha.0 -> error
  • 4.0.0-alpha.2 -> error

Reproduction

https://stackblitz.com/edit/vitejs-example-vue-alpha-borked?file=package.json

Steps to reproduce

  1. Go to https://stackblitz.com/edit/vitejs-example-vue-alpha-borked?file=package.json
  2. It should run npm install && npm run dev
  3. It should end up with an error where the Vue plugin cannot import isCSSRequest from 'vite'.

System Info

I can reproduce the issue locally on macOS as well.

  System:
    OS: macOS 13.0.1
    CPU: (8) arm64 Apple M1
    Memory: 58.41 MB / 8.00 GB
    Shell: 3.5.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 18.12.1 - /opt/homebrew/opt/node@18/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.19.2 - /Volumes/Pieces/.npm/bin/npm
  Browsers:
    Chrome: 108.0.5359.71
    Firefox Nightly: 109.0a1
    Safari: 16.1
  npmPackages:
    @vitejs/plugin-vue: ^4.0.0-alpha.2 => 4.0.0-alpha.2
    vite: ^3.2.4 => 3.2.4

Used Package Manager

npm

Logs

No response

Validations

@fvsch
Copy link
Author

fvsch commented Dec 5, 2022

Other alpha plugins like @vitejs/plugin-react@3.0.0-alpha.2 seem to work with Vite 3.2.4. So it might be specific to the Vue plugin.

@sapphi-red
Copy link
Member

Closing as this is now fixed.

@xpluscal
Copy link

How has this been fixed @sapphi-red ?

@sapphi-red
Copy link
Member

@xpluscal
Copy link

@sapphi-red you're saying the stable version of vite? I'm currently experiencing this error only using yarn and on vite 3.2.5

@sapphi-red
Copy link
Member

I don't get what you mean. plugin-vue 4.0.0 works with Vite 4.0.0. It doesn't work with Vite 3.x as specified by peerDeps.

@venom90
Copy link

venom90 commented Jan 6, 2023

I'm getting this error when using pnpm install for turbo repo + sveltekit + tailwind

https://github.com/oneezy/monorepo

  1. Clone above repository
  2. pnpm install
  3. pnpm run dev

@JosepAlacid
Copy link

This is the biggest pitty coding with compound js frameworks. Any update will cost you time, money and mental health.
Any post in issues is cross answered from one dependecy to another, everyone blaming the other part:

I'm getting this error when using pnpm install for turbo repo + sveltekit + tailwind

https://github.com/oneezy/monorepo

1. Clone above repository

2. pnpm install

3. pnpm run dev

@github-actions github-actions bot locked and limited conversation to collaborators Jan 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants