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

npm publish ignoring files in dist directory when trying to publish to github package registry

Here is a strange one for you, when I try to publish a package with npm to github on my new MacBook Pro (it is an M1, so it might be a bit of weirdness) it just it ignores all the files in the "dist" directory except for the package.json file. It…
0
votes
1 answer

package versioning for Angular application is not updating automatically while uploading on artifactory

I have an angular app with basic Hello world code. When I run this code on my local everything seems to be successful for npm build and automatic versioning being displayed on "welcome page UI" for every version bump automatically without any change…
0
votes
3 answers

Why all files of my npm package are installed in node_modules?

Here is what I have in node_modules when I install my package: Even though I am using this files field in package.json: "files": [ "./dist" ] Why is that?
raury
  • 85
  • 1
  • 7
0
votes
2 answers

Not able to publish my react components as private npm package

I have created a new organisation on npm and I am trying to publish my react component as a scoped package so that my team can use the same component in-house in all other apps. On running npm publish command I am getting the following npm ERR! code…
Jasmohan Singh
  • 61
  • 3
  • 11
0
votes
1 answer

Github actions trigger build on tags and branches

I have typescript project in repository. The release policy is that we publish package from master branch to next npm tag, and we have dedicated branch called release that publishes to latest npm tag. I want to optimize solution and only run it…
AlexS
  • 927
  • 4
  • 16
  • 29
0
votes
1 answer

React page is different when using "npm start" and "npm run deploy"

I am building my website and I have issues using npm start to preview images in my web-pages. When using npm start to preview locally my page all the images and videos cannot be found but when I deploy online using github gh-pages -d build…
0
votes
1 answer

Install NPM package for angular library

I am just picking up Angular 8 and CLI and have created a project as below ng new my-demo cd my-demo ng g library foo --prefix=my Now in my library I want to add ngx-bootstrap as the component and will need the DropdownButtonModule so my question…
0
votes
1 answer

Publish NPM package with Azure DevOps Pipeline task: ArtifactoryNpm@2 to Artifactory

I am working on a large project. I need to publish several Angular libraries whose code is in Azure DevOps to JFrog Artifactory. From previous developers, I found the task: ArtifactoryNpm@2 command in pipeline YAML file, which publishes a package to…
0
votes
0 answers

I am trying to build NPM module with React Hooks and Webpack , so after Publishing package when i try to use it's giving Invalid Hook call Error

so after publishing package when i import it in local application then it's giving me There are three common reasons you might be seeing it: You might have mismatching versions of React and React DOM. You might be breaking the Rules of Hooks. You…
Prashant Shah
  • 226
  • 1
  • 8
0
votes
1 answer

npm access ls-collaborators is not reading from the custom registry in .npmrc

I have a custom .npmrc file as follows @foo:registry=https://gitlab.com/api/v4/packages/npm/ // This works and it returns the latest dist tag from the registry as configured in .npmrc npm view --json @foo/my-package dist-tags // This fails with a…
Ryan
  • 3,715
  • 2
  • 20
  • 17
0
votes
4 answers

npm publish error - "npm ERR! 403 403 Forbidden - package version that is forbidden"

I tried to publish a new version of my package no npm and got this error: npm ERR! code E403 npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/yolo-coords - You cannot publish over the previously published versions: 1.0.4. npm ERR! 403 In…
Evandro Pomatti
  • 13,341
  • 16
  • 97
  • 165
0
votes
1 answer

How to exit from npm publish if a file is missing?

I am running a npm publish which embeds a wasm binary file, and I want to check if the compiled file is not missing before actually publishing. I guess I could use prepublishOnly with a custom shell command? Is there any more specific rule to put…
ymoreau
  • 3,402
  • 1
  • 22
  • 60
0
votes
1 answer

Declaration file for npm package

I published my first npm package but when downloaded it to one of my projects I found out that I need to implement the declaration file ("*.d.ts"). I have tried to integrate it but without success. I've been wasting days on this issue. Please…
D10S
  • 1,468
  • 2
  • 7
  • 13
0
votes
1 answer

Declaration file for published npm package

I published my first npm package which was written with TypeScript. I have downloaded it to another project I have and found out I don't get completion and it is almost impossible to use it this way (not fully impossible thanks to the…
D10S
  • 1,468
  • 2
  • 7
  • 13
0
votes
1 answer

Is it possible to automate "npm publish" prompts?

Running npm publish to push a package to NPM there are several prompts where you confirm package name, license, etc. Is there an equivalent of npm publish -y? (i.e. in the way that apt-get install -y will automatically just say 'yes' for all…
Zach Smith
  • 8,458
  • 13
  • 59
  • 133