0

I'm currently learning how to use semantic-release/gitlab to get automate versioning after pushing to my branch, but when I tried the command below in bash:(directory is in my project folder)

npm install -g semantic-release/gitlab

I got warning

npm WARN @semantic-release/gitlab@0.0.0-development requires a peer of semantic-release@>=15.8.0 <16.0.0 but none is installed. You must install peer dependencies yourself.

+@semantic-release/gitlab@0.0.0-development
added 85 packages from 101 contributors in 89.758s

I also tried

npm install --save-dev semantic-release/gitlab

This gave me similar warning as above.

Then I followed a tutorial, trying to get npm token & Gitlab private token, when I try:

$ ./.npmrc

it gave me this:

 line 1: //registry.npmjs.org/:_authToken=: No such file or directory

How can I get a npm token?

I'm not sure what to do now and what's the next step, can someone help me, and it would be great if someone can send a instruction that I can follow. I've been stuck for a whole day now, please help!!!!Many thanks.

wawawa
  • 2,835
  • 6
  • 44
  • 105

1 Answers1

2

The warning tells you what to do, you have to install semantic-release as it's a peer dependency. You can install just like you installed semantic-release/gitlab: npm install semantic-release --save-dev.

  • Hi thanks for the answer, I did some research and found out there're two different plugins 'semantic-release/gitlab' & 'semantic-release-gitlab', what's the difference? I updated something in my question, I also have issues when getting the npm tokens, would be great if you can help me. Many thanks. – wawawa Nov 15 '19 at 09:35