2

I have this error when i try to do an npm install --save of a gitlab.com repo :

npm install--save git@gitlab.com:xxxxx\yyyyyy.git
npm ERR! Could not install from "gitlab.com:xxxxx\yyyyyy.git" as it does not contain a package.json file.

I tried to clone and then to link the directory :

  • git clone
  • npm link ../directory

Everything works fine.

Is someone have an idea ?

knud
  • 23
  • 2
  • Does this answer your question? [How to install an npm package from GitHub directly?](https://stackoverflow.com/questions/17509669/how-to-install-an-npm-package-from-github-directly) – ALUFTW Mar 03 '21 at 04:29

1 Answers1

0

Use it this way: npm install https://github.com/xxxxxx/yyyyyy.git --save

ALUFTW
  • 1,914
  • 13
  • 24