package.json not found during npm install --save on gitlab

Viewed 344

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 ?

1 Answers

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

Related