Skip to content

nbb fails to download nbb.edn deps when babashka is not in the PATH #328

Open
@ikappaki

Description

@ikappaki

version

nbb v1.2.169

platform

any

problem

nbb fails to download nbb.edn deps when nbb is not in the PATH:

'bb' is not recognized as an internal or external command,
operable program or batch file.

repro

  1. Make sure bb is not in the PATH
  2. Create a nbb.edn file with a single dependency:
{:deps {org.babashka/cli {:mvn/version "0.4.39"}}}
  1. Run npx nbb, nbb fails with the following message:
Downloading dependencies...
'bb' is not recognized as an internal or external command,
operable program or batch file.
Command failed: bb --config c:\issue-nbb-bb-deps\.nbb\.cache\00274e32d7c4c425ff9265bf85fd6e0ea82185c4\deps.edn uberjar c:\cssue-nbb-bb-deps\.nbb\.cache\00274e32d7c4c425ff9265bf85fd6e0ea82185c4\nbb-deps.jar
'bb' is not recognized as an internal or external command,
operable program or batch file.

expected behavior

The documentation does not indicate any requirement for an external program to fulfill certain operation of nbb (unless I've missed it 😅 ), thus the failure is unexpected.

In retrospect and after looking at the code a little, it seems obvious that if nbb is to download clj "packages" from the clojure ecosystem, it will need to tap in to some existing framework to do so. I suppose this framework is maven and thus the need for bb to orcherstarte this?

Possible solution I can think of:

  1. Is it possible to implement the same functionality in pure clojurescript (or using an existing npm package)?
  2. Update documentation to clearly indicate that any clojure deps require bb to be in path.

The problem with requiring bb to be available and able to connect to the internet is that nbb might not work behind corporate firewalls or systems with restricted access to tooling other than node.js and npm packages.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions