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

Deno 2.0: BYONM should only be enabled when root folder has package.json #25355

Closed
marvinhagemeister opened this issue Sep 2, 2024 · 3 comments · Fixed by #25379
Closed

Deno 2.0: BYONM should only be enabled when root folder has package.json #25355

marvinhagemeister opened this issue Sep 2, 2024 · 3 comments · Fixed by #25379
Assignees
Labels
bug Something isn't working correctly
Milestone

Comments

@marvinhagemeister
Copy link
Contributor

For some reason it seems like having a package.json in a different workspace member affects resolution in a workspace member that doesn't have one. In this case the "Could not find matching package in package.json file" error is thrown in a workspace member that has no package.json.

Steps to reproduce

  1. Clone https://github.com/zemili-group/moonrepoV3
  2. Run cd apps/zemili/backend/
  3. Run deno task dev

Output:

error: Could not find a matching package for 'npm:path-to-regexp@6.2.1' in a package.json file. You must specify this as a package.json dependency when the node_modules folder is not managed by Deno.
    at https://jsr.io/@oak/oak/16.1.0/deps.ts:87:8

Version: Deno 2.0.0-rc.0+42cf762

@bartlomieju
Copy link
Member

Duplicate #23267

@marvinhagemeister
Copy link
Contributor Author

Reopening, because this issue is not a duplicate of #23267 . That one isn't about workspaces but this one is.

@dsherret dsherret self-assigned this Sep 3, 2024
@dsherret dsherret added this to the 2.0.0 milestone Sep 3, 2024
@dsherret
Copy link
Member

dsherret commented Sep 3, 2024

We should only enable byonm when the root workspace folder has a package.json.

The reason is so that adding a new workspace member that has a package.json doesn't change the behaviour.

@dsherret dsherret changed the title Bug: "Could not find matching package in package.json file" with no package.json Deno 2.0: BYONM should only be enabled when root folder has package.json Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants