cloudflare / cloudflare/workers-sdk
🐛 BUG: C3 run in root of drive fails with `EPERM: operation not permitted`
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.5k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 187
Description
### Which Cloudflare product(s) does this pertain to?
C3
### What version(s) of the tool(s) are you using?
2.16.1
### What version of Node are you using?
20.12.0
### What operating system and version are you using?
Windows 11
### Describe the Bug
### Observed behavior
When running `npm create cloudflare@latest` in the root of a drive in Windows results in the following error:
```
PS E:\> npm create cloudflare@latest
using create-cloudflare version 2.16.1
╭ Create an application with Cloudflare Step 1 of 3
│
├ In which directory do you want to create your application?
│ dir ./spring-lab-d577
│
╰ ERROR Error: EPERM: operation not permitted, mkdir 'E:\'
npm ERR! code 1
npm ERR! path E:\
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c create-cloudflare
```
Using all defaults, just hitting enter with the randomly generated dir name.
### Expected behavior
I would expect this to work without issue. `npm create astro@latest` in `E:/` for example works fine.
Contributor guide
Research direction
Start by reproducing `npm create cloudflare@latest` from a Windows drive root with the default randomly generated directory, using the reported Node 20.12.0 and C3 2.16.1 versions. Trace the `create-cloudflare` entry point and its directory creation path, then verify that application creation succeeds from a drive root without attempting to mkdir the drive itself.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100