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?]: TypeError: le.trim is not a function when running yarn npm audit -AR #6554

Open
1 task
RikClaessens opened this issue Oct 10, 2024 · 0 comments
Open
1 task
Labels
bug Something isn't working

Comments

@RikClaessens
Copy link

Self-service

  • I'd be willing to implement a fix

Describe the bug

When I run yarn npm audit --recursive / yarn npm audit -R, so with the recursive option enabled I receive the following error:

YN0001: TypeError: le.trim is not a function
    at /.yarn/releases/yarn-4.5.0.cjs:694:1891
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async AA.start (/.yarn/releases/yarn-4.5.0.cjs:199:6855)
    at async SC.execute (/.yarn/releases/yarn-4.5.0.cjs:694:1231)
    at async SC.validateAndExecute (/.yarn/releases/yarn-4.5.0.cjs:94:787)
    at async t.run (/.yarn/releases/yarn-4.5.0.cjs:98:3249)
    at async fPt (/.yarn/releases/yarn-4.5.0.cjs:735:7743)
    at async Wx (/.yarn/releases/yarn-4.5.0.cjs:736:142)

Some inspection makes me have a hunch that the dependency @backstage/plugin-scaffolder-backend-module-bitbucket could be the cause. Since the value of le seems to resolve to a boolean value of true and thus true.trim() is not a function.

I've created a minimal reproduction here: https://github.com/RikClaessens/yarn-npm-audit-error

To reproduce

Use the repo here: https://github.com/RikClaessens/yarn-npm-audit-error

Or:

  1. In any project, yarn add @backstage/plugin-scaffolder-backend-module-bitbucket.
  2. yarn npm audit -AR

Environment

System:
OS: macOS 14.5
CPU: (10) arm64 Apple M1 Pro
Binaries:
Node: 20.18.0 - /private/var/folders/6q/ym614jjs5933p6k4k8j0k29h0000gn/T/xfs-adc16c48/node
Yarn: 4.5.0 - /private/var/folders/6q/ym614jjs5933p6k4k8j0k29h0000gn/T/xfs-adc16c48/yarn
npm: 10.8.2 - ~/.nvm/versions/node/v20.18.0/bin/npm
bun: 1.0.14 - /opt/homebrew/bin/bun

Additional context

No response

@RikClaessens RikClaessens added the bug Something isn't working label Oct 10, 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
Projects
None yet
Development

No branches or pull requests

1 participant