2

I forked and module on Github, changed it for my needs and pushed back to git. Now I am trying to install this module with npm with

npm install git+http://github.com/username/modulename.git

But I get the following error:

npm ERR! Command failed: git submodule update -q --init --recursive npm ERR! fatal: O:/Programs/Git/mingw64/libexec/git-core\git-submodule cannot be used without a working tree.

What can cause it and how to fix it?

1 Answer 1

2

Check if this is similar to this thread:

After a bit of debugging, I have determined that this actually works if I use the url "https://github.com/nfroidure/ttf2woff2#master" instead.
This is because it is doing a shallow clone, which doesn’t use --mirror, so isn’t a bare repository.

So in your case:

npm install "https://github.com/username/modulename.git#master"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.