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

Doesn't work with pnpm. Package "x" was not found. #175

Open
marcomontalbano opened this issue Oct 27, 2022 · 2 comments
Open

Doesn't work with pnpm. Package "x" was not found. #175

marcomontalbano opened this issue Oct 27, 2022 · 2 comments

Comments

@marcomontalbano
Copy link

Describe the bug
When I run license-compliance under a project with pnpm it throws Package "x" was not found. Confirm that all modules are installed. many times even if the package is correctly installed.

To Reproduce
Steps to reproduce the behavior:

# setup
npm init -y
pnpm add axios
pnpm add -D license-compliance

# running the script
pnpm license-compliance


# I get the following output:

# Package "follow-redirects" was not found. Confirm that all modules are installed.
# Package "proxy-from-env" was not found. Confirm that all modules are installed.
# Package "form-data" was not found. Confirm that all modules are installed.
# Package "chalk" was not found. Confirm that all modules are installed.
# Package "commander" was not found. Confirm that all modules are installed.
# Package "cosmiconfig" was not found. Confirm that all modules are installed.
# Package "debug" was not found. Confirm that all modules are installed.
# Package "joi" was not found. Confirm that all modules are installed.
# Package "spdx-expression-parse" was not found. Confirm that all modules are installed.
# Package "spdx-satisfies" was not found. Confirm that all modules are installed.
# Package "xmlbuilder" was not found. Confirm that all modules are installed.
# Package "tslib" was not found. Confirm that all modules are installed.
# Licenses
# └─ MIT: 2

Expected behavior
Doing the same with npm or yarn it perfectly works with the following result:

Licenses
├─ MIT: 47
├─ BSD-3-Clause: 6
├─ 0BSD: 1
├─ CC-BY-3.0: 1
├─ CC0-1.0: 1
├─ (MIT AND CC-BY-3.0): 1
└─ ISC: 1

Screenshots
error with pnpm

Please complete the following information):

  • OS: MacOS Ventura 13.0
  • Node: >= v16.17.0

Additional context
Additional information about node_modules structure on pnpm: https://pnpm.io/symlinked-node-modules-structure

@tmorell
Copy link
Owner

tmorell commented Nov 1, 2022

@marcomontalbano Thank you for reporting this. I have confirmed that license-compliance is not compatible with pnpm; the dependency tree must be traversed with a different approach.
While this gets addressed, please note that you can analyze the top level (direct) dependencies:

pnpm license-compliance -t

@marcomontalbano
Copy link
Author

Hi @tmorell, as soon as this PR will be merged, maybe it could help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants