Questions tagged [npm-publish]

npm publish is command on npm CLI, which publishes the specified package to the npmjs repository and then can be available to install through npm install command.

is a package manager for .

npm publish <packagename> is a command on npm CLI, which publishes the specified package to the npmjs repository. Published packages can then be installed via the command, i.e. npm install <packagename>

Reference:

396 questions
4
votes
3 answers

Why does Travis CI report a build success even though the npm publish failed?

I noticed on build https://travis-ci.org/neverendingqs/openssl-self-signed-certificate/builds/187723295 that I forgot to increase the patch version when tagging the repo. However, the build reported as passing even though the npm publish failed due…
neverendingqs
  • 4,006
  • 3
  • 29
  • 57
4
votes
2 answers

How do I deal with d.ts files when publishing my typescript code to npm

I have been following this article: How to create strongly-typed npm packages and have been trying to setup my typescript project to publish it to npm. It all seems to make sense but what is not covered is how to deal with d.ts files. My project…
Roaders
  • 4,373
  • 8
  • 50
  • 71
3
votes
1 answer

Increase the NPM Package version automatically

I am creating my own NPM packages for the first time. For each commit, 1/ The package version should increase on the NPM registry, 2/ Update the package.json file in the github repository. .github/workflows/publish.yml on: push: branches: …
Nandy
  • 666
  • 1
  • 12
  • 27
3
votes
0 answers

Npm package publishing with dependencies

I am learning to publish a demo application to npm. My package "abc" has a dependency of typeorm and another demo package "pqr" which is also using typeorm as a dependency. I want to install "abc" in a "nodejs_web_app" and I want "pqr" to be…
3
votes
2 answers

Error in .gitlab-ci while trying to package

So I'm trying to make conditions in my .gitlab-ci.yml if there is no package then, npm publish to pack the library in the GitLab registry I gave my pipeline the permission to the registry and the npm access token, but I still get the unauthorized…
Haru
  • 83
  • 9
3
votes
1 answer

NPM attempts to publish twice

I am maintaining my first npm package so this might be an error on my part. Once build my package and commit it to git the next step is: $ npm version patch $ npm publish The output (abridged) is as follows: npm notice npm notice …
AlanObject
  • 9,613
  • 19
  • 86
  • 142
3
votes
1 answer

npm publish only publish index.js and excluding everything else

Problems I'm trying to publish my own SDK in npm. When I'm trying to install my packages, my dist folder only shows index.js Code: Here is my package.json file. It already includes main and files, https://docs.npmjs.com/cli/v8/using-npm/scripts. { …
3
votes
2 answers

How to pack latest changes using npm pack?

I am trying to test one of the package locally. What I do is go the root directory of my package and run npm pack It creates .tgz file and I install this file via npm i . Now I found that some of my recent changes are missing in this…
Gaurav Chauhan
  • 1,295
  • 4
  • 17
  • 41
3
votes
1 answer

Publishing a previous major version to npm with no tag and avoiding latest

Is there a best way to publish a previous major version of an npm package without adding a tag for it? Our current major version is 3.x (v3) so we npm publish that version to automatically give it the latest tag. When we publish updates to the 2.x…
alexbea
  • 1,311
  • 14
  • 25
3
votes
0 answers

How to overwrite beta versions in private gitlab NPM registry

I am currently working with GitLab-CI and one problem that I have is that I need to use unique version names in my NPM registry. Now, while I really like this feature with NPM in the open world, in development when pipelines are run on development…
relief.melone
  • 3,042
  • 1
  • 28
  • 57
3
votes
2 answers

npm publish not working on AWS CodeArtifact

I am trying to use npm publish to publish a javascript library to a private NPM repository hosted on AWS Codeartifact. When I try running npm publish on my local machine, it works without any issues. However, when I try to run it on Jenkins, it…
3
votes
1 answer

Creating an NPM package out of a Create React App and publish on Gitlab

This might be a stupid question but I really don't know what is going on. I have created a React App with crate react app and uploaded it as a private repository to my GitLab account. The (default) React App starts as expected after running yarn…
Flo Ragossnig
  • 1,341
  • 14
  • 38
3
votes
2 answers

Errors trying to publish npm package

I published fine last week but I tried today and it does not work on any of my computers. It is weird, at first I thought there was an issue with the service but then I started doing some solutions I found on the web and now I get this when I try…
3
votes
1 answer

How to install the latest SNAPSHOT version in npm?

We have a private nexus repository and publishing all the npm modules there. We have Module A and Module B, B is dependent on A. Here I am getting an issue with installing the latest SNAPSHOT version. For example: Module A has published versions…
Ram's
  • 111
  • 1
  • 1
  • 12
3
votes
1 answer

npm install integrity is different in different environments (windows vs linux)

The SHA512 integrity check is created upon npm install which is different in my local machine vs the same code in git CI. My local environment is windows 10 and in GIT CI I am using node:10-alpine docker image. In Windows: npm notice name: …
shiv
  • 41
  • 1