voidzero-dev / voidzero-dev/vite-plus

vp create fails when creating application within monorepo

Aperta
#820 1 commento 2 reazioni 1 assegnatario Rivendicata da @fengmk2 Vedi su GitHub
Lingua principale
Rust
Stelle
5.8k
Fork
262
Merge medio
1g 34m
PR unite (30g)
135

Descrizione

### 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).

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.