ElMassimo / iles

šŸ The joyful site generator
https://iles.pages.dev
MIT License
1.06k stars 31 forks source link

iles using a named export from vue/transformer-sfc that does not exist #266

Open jmegs opened 6 months ago

jmegs commented 6 months ago

Description šŸ“–

iles using a named export from vue/transformer-sfc that does not exist

Dependencies Info ```sh iles v0.9.5 | vite v4.5.1 - iles@0.9.5 - typescript@5.3.3 - vue-tsc@1.8.27 ```

Logs šŸ“œ

If not providing a reproduction:

Output ```sh $ DEBUG=iles:* npm run dev > iles-app@0.0.0 dev > iles dev --open file:///Users/jmeguerian/Code/tmp/iles-app/node_modules/iles/dist/node/chunk-IMB7AIW2.js:63 import { shouldTransformRef, transformRef } from "vue/compiler-sfc"; ^^^^^^^^^^^^ SyntaxError: The requested module 'vue/compiler-sfc' does not provide an export named 'transformRef' at ModuleJob._instantiate (node:internal/modules/esm/module_job:132:21) at async ModuleJob.run (node:internal/modules/esm/module_job:214:5) at async ModuleLoader.import (node:internal/modules/esm/loader:329:24) at async executeCommand (file:///Users/jmeguerian/Code/tmp/iles-app/node_modules/iles/dist/node/cli.js:25:30) Node.js v21.1.0 ```
ohuu commented 6 months ago

I'm seeing the same thing.

ohuu commented 5 months ago

It looks like transformRef was removed in vue 3.4. See line 15 here

My nasty hack of a workaround is to fiddle my package-lock to force vue 3.3.

It seems from this commit (lines 73-78) that shouldTransformRef is hardcoded to return false, suggesting that this functionality is no longer needed and we can remove all references to transformRef in iles?

ElMassimo commented 5 months ago

Thanks for reporting, I'll remove usage of transformRef in the next release.


The reactivityTransform proposal has been removed in Vue 3.4, but it's usable through a third-party plugin.

I think the reactivity transform remains a nicer dialect when using script setup, especially once Vue introduced the ability for watch to receive a getter, which addressed some of the DX concerns such as having to use $$().

However, it's better to let the user make that decision on their own (custom Vite plugins can be added easily in iles.config.ts).

therealshark commented 5 months ago

Do you have an ETA? Right now a fresh iles instance is broken right after install. I tried to massage my package lock into working but was less successful than @ohuu

This also fixes #242

ohuu commented 5 months ago

Hey @ElMassimo I'd really like to contribute to Iles, maybe this would be a good issue to tackle but I'd need some onboarding to the project. Is there any docs which would help me to setup a dev environment so I can start working on it?

ElMassimo commented 5 months ago

Hi Oliver! That would be great! šŸ˜ƒ

I haven't written an onboarding guide to the project itself, but typically all you need is a modern Node version (20, for example), and pnpm to install dependencies for the entire project.

Building packages can be done by running pnpm run build inside each package, or pnpm run dev to keep a daemon running to rebuild the package as you change the source code.

peterstnsz commented 2 weeks ago

Hey folks, have the same issue would love to see some workaround examples. Not sure how to approach package-lock to force vue 3.3? Unless there are more elegant solutions...

Ninja edit: As per https://github.com/Pinegrow/pg-iles-vuetify/issues/1#issuecomment-1953343698 Adding this to package.json works, thank you!

"pnpm": {
    "overrides": {
      "vue": "3.3",
      "vite": "4.4"
    }
  }