voidzero-dev / voidzero-dev/vite-plus

vp create fails when creating application within monorepo

Abierto
#820 1 comentario 2 reacciones 1 asignado Reclamado por @fengmk2 Ver en GitHub
Lenguaje dominante
Rust
Estrellas
5.8k
Forks
262
Merge medio
1 d 34 min
PR fusionados (30 d)
135

Descripción

### Describe the bug

I created a monorepo with `vp create`. Then I opened a terminal within the monorepo and wanted to create an application within. However, that fails

```
~\Desktop\temp\religion-pursue> vp create
VITE+ - The Unified Toolchain for the Web

Vite+ Application

◇ Where should the new package be added to
the monorepo:
apps/

◇ Package name:
temperature-symbol

◇ Which agents are you using?
none

◑ Generating project (0s)
ENOENT: no such file or directory, open 'C:\Users\Stefnotch\Desktop\temp\religion-pursue\apps\temperature-symbol\package.json'
Error: ENOENT: no such file or directory, open 'C:\Users\Stefnotch\Desktop\temp\religion-pursue\apps\temperature-symbol\package.json'
at Object.readFileSync (node:fs:440:20)
at readJsonFile (file:///C:/Users/Stefnotch/Desktop/temp/religion-pursue/node_modules/.pnpm/vite-plus@0.1.11_@types+nod_56901132907ec8649d648f911ba150e8/node_modules/vite-plus/dist/global/json-BRdVJ52a.js:130:21)
at editJsonFile (file:///C:/Users/Stefnotch/Desktop/temp/religion-pursue/node_modules/.pnpm/vite-plus@0.1.11_@types+nod_56901132907ec8649d648f911ba150e8/node_modules/vite-plus/dist/global/json-BRdVJ52a.js:144:27)
at setPackageName (file:///C:/Users/Stefnotch/Desktop/temp/religion-pursue/node_modules/.pnpm/vite-plus@0.1.11_@types+nod_56901132907ec8649d648f911ba150e8/node_modules/vite-plus/dist/global/create.js:3232:2)
at executeBuiltinTemplate (file:///C:/Users/Stefnotch/Desktop/temp/religion-pursue/node_modules/.pnpm/vite-plus@0.1.11_@types+nod_56901132907ec8649d648f911ba150e8/node_modules/vite-plus/dist/global/create.js:3488:2)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async main (file:///C:/Users/Stefnotch/Desktop/temp/religion-pursue/node_modules/.pnpm/vite-plus@0.1.11_@types+nod_56901132907ec8649d648f911ba150e8/node_modules/vite-plus/dist/global/create.js:4130:12) {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\Users\\Stefnotch\\Desktop\\temp\\religion-pursue\\apps\\temperature-symbol\\package.json'
}
Failed to generate code: ENOENT: no such file or directory, open 'C:\Users\Stefnotch\Desktop\temp\religion-pursue\apps\temperature-symbol\package.json'

■ Canceled (0s)
```

### Reproduction

-

### Steps to reproduce

`vp create`
select the monorepo stuff
`cd path-to-monorepo`
`vp create`
select the "Vite+ Application" option

And then it should fail, at least on Windows systems. It seems to create a folder named `appstemperature-symbol` instead of actually creating the directory hierarchy of `apps/temperature-symbol `.

Interestingly enough, creating "Vite+" libraries does work

### System Info

```shell
VITE+ - The Unified Toolchain for the Web

Environment:
Version 24.14.0
Source lts

Tool Paths:
node C:\Users\Stefnotch\.vite-plus\js_runtime\node\24.14.0\node.exe
npm C:\Users\Stefnotch\.vite-plus\js_runtime\node\24.14.0\npm.cmd
npx C:\Users\Stefnotch\.vite-plus\js_runtime\node\24.14.0\npx.cmd

VITE+ - The Unified Toolchain for the Web

vp v0.1.11

Local vite-plus:
vite-plus Not found

Tools:
vite Not found
rolldown Not found
vitest Not found
oxfmt Not found
oxlint Not found
oxlint-tsgolint Not found
tsdown Not found
```

### Used Package Manager

bun

### Logs

```shell

```

### Validations

- [x] Read the [Contributing Guidelines](https://github.com/voidzero-dev/vite-plus/blob/main/CONTRIBUTING.md).
- [x] Check that there isn't [already an issue](https://github.com/voidzero-dev/vite-plus/issues) for the same bug.
- [x] Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- [x] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example).

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.