qwik
qwik copied to clipboard
[🐞] Unable to install into current directory
Which component is affected?
Starters / CLI
Describe the bug
Related: #3901
The solution introduced to that feature request is not sufficient. Whenever I try to create new project, I get following error in console
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
[Error: EBUSY: resource busy or locked, rmdir 'C:\Users\user\projects\qwik-test'] {
errno: -4082,
code: 'EBUSY',
syscall: 'rmdir',
path: 'C:\\Users\\user\\projects\\qwik-test'
}
It looks like ide is not allowing to delete its project settings folder while running. Cannot reproduce it in online sandbox, only locally
Reproduction
It has to be reproduced locally and manually
Steps to reproduce
- Open ide
- Create new project from ide interface
- Run
npm/yarn/pnpm create qwik@latestin terminal - Select current
.folder as destination - Agree to overwrite it when asked
- Script fails with error mentioned above
System Info
System:
OS: Windows 10 10.0.19044
CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor
Memory: 12.89 GB / 23.95 GB
Binaries:
Node: 18.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
npm: 8.19.3 - C:\Program Files\nodejs\npm.CMD
Additional Information
No response
Seems like something is using the folder...
EBUSY: resource busy or locked, rmdir
do you have any editor or something open?
Yes, naturally
The current idea works by removing the folder and creating a new one, vscode is locking the folder, so the CLI can not remove it.
This could be fixed by trying to avoid removing the folder and instead remove all the content, in here: https://github.com/BuilderIO/qwik/blob/9be6588e6ff83ed704b0d117e71ae5a434b0d51a/packages/create-qwik/create-interactive.ts#L74
Would u be up to make a PR? :)
I can try to
How can I test this script locally to see how it works with my changes?
I too support for installing without deleting anything.
hi 👋 thanks for having a look at it 🙏 guess it was a design decission to remove the directory and create a new one. guess we have to make sure, that in the proposed way all files are removed also hidden files to avoid other conflicts.
and yes, there is a prompt where you need to confirm the deletion atm 👍
to test the changes locally you can run pnpm cli locally.
and pls let me know when u need help or i should take over 👍 thanks again for having a look at it 🙏
I made a fix. Tested it, seems to be working