aws / aws/aws-pdk

[BUG] Creating new project in empty directory fails

Open
#943 0 comments 0 reactions 0 assignees View on GitHub
bug needs-triage
Dominant language
TypeScript
Stars
451
Forks
84
Avg merge
20h 3m
Merged PRs (30d)
1

Description

### Describe the bug

Running `npx projen new --from @aws/pdk --package-manager=pnpm monorepo-ts` on empty new folder creates following error
```
C:\Users\{username}\{project_folder}\node_modules\projen\lib\file.js:98
throw new Error(`There is already a file under ${rootProjectPath}`);
Error: There is already a file under pnpm-workspace.yaml
```

### Expected Behavior

Should generate new project without error

### Current Behavior

Failes with the above error

### Reproduction Steps

Running `npx projen new --from @aws/pdk --package-manager=pnpm monorepo-ts` in empty folder should reproduce it

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### PDK version used

latest version downloaded automatically trough npx

### What languages are you seeing this issue on?

_No response_

### Environment details (OS name and version, etc.)

Windows 11

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with `npx projen new --from @aws/pdk --package-manager=pnpm monorepo-ts` in an empty Windows directory. Start at `node_modules/projen/lib/file.js` around line 98 and trace why `pnpm-workspace.yaml` is treated as an existing file; done means the command completes and generates the project without the error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.