Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] .npmrc is generated in all the packages #376

Closed
rverma-dev opened this issue Apr 28, 2023 · 1 comment · Fixed by #385
Closed

[BUG] .npmrc is generated in all the packages #376

rverma-dev opened this issue Apr 28, 2023 · 1 comment · Fixed by #385
Labels
bug Something isn't working

Comments

@rverma-dev
Copy link

Describe the bug

With version 0.17.3 onward, projen is also generating .npmrc file in each directory based on https://github.com/sperka/aws-prototyping-sdk/blob/c85312c706e776ef49beed02fa97df3285759cf8/private/projects/pdk-monorepo-project.ts#L174

This lead to unnecessary file generation and warnings

npm WARN ignoring workspace config at /Users/rverma/dev/aws/nsa/packages/demo/.npmrc 

More details of handling this is here npm/cli#4605

Expected Behavior

To generate only file in the root package

Current Behavior

Generating npmrc in all the packages

Reproduction Steps

Add a child project to monorepo and observe

Possible Solution

No response

Additional Information/Context

No response

PDK version used

0.17.3/4

What languages are you seeing this issue on?

Typescript

Environment details (OS name and version, etc.)

Macos ARM

@rverma-dev rverma-dev added the bug Something isn't working label Apr 28, 2023
@cogwirrel
Copy link
Member

This is actually due to a change I made to projen to always create a .npmrc file for PNPM projects so that resolution-mode is set to highest. For reference see the projen issue here projen/projen#2628 and where I upgraded the projen peer dependency version in PDK here: #373

Nevertheless it is annoying having the extra .npmrc files, so I'll send a PR to remove any subproject .npmrc files if you're using the nx-monorepo

agdimech added a commit that referenced this issue May 3, 2023
Fix #376

Co-authored-by: Adrian Dimech <51220968+agdimech@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants