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
5
votes
1 answer

npm publish azure artifacts

I'm trying to publish a scoped package to a private azure devops artifact feed. I followed the instructions here. I have a project .npmrc with the following…
dalcantara
  • 1,613
  • 2
  • 21
  • 35
4
votes
2 answers

GitHub actions: NPM publish fails with ERR! code ENEEDAUTH

I've attempted to implement the official guide to publishing and installing a package with GitHub Actions: Authenticating to package registries with granular permissions Fails with: npm ERR! code ENEEDAUTH npm ERR! need auth This command requires…
4
votes
2 answers

How to publish multiple versions of same package to gitlab registry

I am working on a usecase where there is a requirement to publish multiple versions of same package. I have to publish these version of package in to my gitlab npm registry. I have searched on this but everyone is telling to use scopes which is not…
Sai Vamsi
  • 111
  • 3
  • 19
4
votes
0 answers

Publishing with lerna after prerelease without using force-publish

we currently have the following workflow. ticket comes in (eg. BRAND-1234) we create a branch and work on the ticket and commit and push for testing, we do then yarn lerna publish preminor --preid BRAND-1234 now other collegues can use…
Luke
  • 8,235
  • 3
  • 22
  • 36
4
votes
1 answer

Publish Npm Package to JFrog artifactory using Github action

How can I publish Npm Package to custom JFrog artifactory using Github action? publish: name: Publish the Packages needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 …
VJAI
  • 32,167
  • 23
  • 102
  • 164
4
votes
1 answer

Cannot publish to npm from GitHub Actions: ` is not in the npm registry` error

I can successfully publish my npm package from the command line, but when I try to publish it automatically via a GitHub action, using an Automation token, I get: npm notice name: stereo-img npm notice version:…
Steren
  • 7,311
  • 3
  • 31
  • 51
4
votes
1 answer

Unable to resolve published NPM module in project

I recently published a simple React module that I wrote in TypeScript. I tested my module by importing the local package into a project, and it worked flawlessly. However, now that I've published the module, whenever I try to import it into a…
Isaac Corbrey
  • 553
  • 3
  • 20
4
votes
0 answers

How to POST (and not PUT) a first package to a newly installed Verdaccio / Docker instance?

I have installed Verdaccio as a Docker container with a docker-compose.yml file: ├── docker-compose.yml ├── INSTALLATION.md ├── README.md └── volumes ├── conf │   ├── config.yaml │   └── htpasswd ├── plugins └── storage which…
Stephane
  • 11,836
  • 25
  • 112
  • 175
4
votes
1 answer

Simple import statements for npm package

I want to publish new npm TypeScript package and I want to be able to use simple import statements (import multiple classes from library via single line) in my project e.g.: import { FirstClass, SecondClass } from "my-repo"; At this time I have to…
dev0experiment
  • 462
  • 1
  • 7
  • 22
4
votes
1 answer

npm publish with git information instead of version from package.json

I am trying to find a solution to publish a npm artefact based on the git information. I looked to npm version and release-it, but these tools automate git actions (commit/push) to make the link between npm artefact version and git, it doesnot get…
mpromonet
  • 11,326
  • 43
  • 62
  • 91
4
votes
3 answers

npm cannot publish over previously published version

npm is causing me grief and I have no idea why. Trying to publish a new version of my package. npm view {{package}} versions [ '0.3.0', '0.3.1', '0.4.0', '0.4.2', '0.5.0', '0.6.0', '0.6.1', '0.7.0', '0.7.1', '0.8.0', '0.8.1', …
Adam Jenkins
  • 51,445
  • 11
  • 72
  • 100
4
votes
1 answer

npm publish is returning 404

i am trying to push a module to npm to but on running npm publish it is returning the follwoing error, i tried every example and solution that was suggested but not able to solve this. I have tried --> Getting 404 when attempting to publish new…
Jaya Krishna
  • 313
  • 4
  • 14
4
votes
1 answer

dynamically add folder to ignore when using npm publish

I have a static .npmignore file with foo bar baz in it. When I publish to NPM, the contents in those 3 dirs will be ignored. My question is, is there a way to dynamically add a folder to ignore when using npm publish at the command line? Something…
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
4
votes
3 answers

Prevent `npm publish` when ran directly

I am not sure weather it is possible or not. Is it possible to prevent publish when npm publish ran directly and make it accessible only via scripts. User must be denied when npm publish is executed directly. i.e. User mush be able to publish via…
Sibiraj
  • 4,486
  • 7
  • 33
  • 57
4
votes
1 answer

Publishing a Node module using NPM in Gitlab-ci doesn't work

I am using gitlab-ci to for my CI/CD to publish a NPM module to a registry. Following is my gitlab-ci.yml file image: docker:latest variables: DOCKER_DRIVER: overlay2 services: - docker:dind cache: untracked: true key:…
andthereitgoes
  • 819
  • 2
  • 10
  • 24