svanderburg / node2nix

Generate Nix expressions to build NPM packages
MIT License
517 stars 98 forks source link

fatal: No url found for submodule path #322

Closed stephen-huan closed 3 months ago

stephen-huan commented 10 months ago

Running

node2nix --nodejs-18 --development --input package.json

with package.json containing

[
  { "highlight.js": "git+https://github.com/highlightjs/highlight.js.git#11.9.0" }
]

errors with the message

Cloning git repository: https://github.com/highlightjs/highlight.js.git
Cloning into 'highlight.js'...
remote: Enumerating objects: 45143, done.
remote: Counting objects: 100% (749/749), done.
remote: Compressing objects: 100% (515/515), done.
remote: Total 45143 (delta 426), reused 406 (delta 227), pack-reused 44394
Receiving objects: 100% (45143/45143), 14.47 MiB | 5.98 MiB/s, done.
Resolving deltas: 100% (30362/30362), done.
Parsing the revision of commitish: 11.9.0
Checking out revision: f47103d4f1ac1592c56904574d1fbf5bf2475605
Note: switching to 'f47103d4f1ac1592c56904574d1fbf5bf2475605'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at f47103d4 (chore) release with v20 of Node
Initializing git sub modules
fatal: No url found for submodule path 'highlight.js' in .gitmodules
git submodule exited with status: 128

but something like

[
  { "highlight.js": "11.9.0" }
]

works fine. I'm a bit confused as many similar packages work fine with github and they don't have submodules.

Could the . in the repo name (highlight.js) be throwing it off?

stephen-huan commented 3 months ago

Probably caused by https://github.com/highlightjs/highlight.js/pull/4047.