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

npm will not ignore my TypeScript source code file no matter what I try

I have an open source project that is written in TypeScript, and is compiled to JavaScript and then published as a CLI tool via npm publish. I've been unable to exclude the TypeScript source code from the npm package, and there are other *.ts files…
Reactgular
  • 52,335
  • 19
  • 158
  • 208
3
votes
1 answer

I can not import my published typescript library, with this error: "Module not found: Can't resolve 'tqt' in ..."

I published a dead simple typescript module using this tutorial, and it is installed via npm install --save tqt@1.0.0 When trying to use it in a program, I get this: Module not found: Can't resolve 'tqt' in…
Anon
  • 2,267
  • 3
  • 34
  • 51
3
votes
2 answers

Get the latest version of a node package in Nexus

We are working on a Node and Angular 5 project in which we are using Nexus as a repository of our application. This application is transpiled, packaged and uploaded to the Nexus repository. Then we have created a pipe in Jenkins that downloads the…
Jose Sabater
  • 83
  • 4
  • 13
3
votes
2 answers

npm publish to nexus

I'm trying to publish an npm package to our nexus private registry using this command : npm publish --registry http://localhost:8081/nexus/content/repositories/npmjs but I get this error : npm ERR! path…
Renaud is Not Bill Gates
  • 1,684
  • 34
  • 105
  • 191
3
votes
2 answers

npm module missing files after publish

For reference, the repo is https://github.com/microsoftly/luis-response-builder. The node module files are generated with tsc and output to the dist folder. I have a prepublishOnly step that removes the dist folder, runs tsc, then runs the test…
3
votes
0 answers

npm install changes file permissions

I have a package (@takinola/handy) that contains the file node_modules/@takinola/handy/public/js/jquery-3.2.1.min.js On my development machine (Ubuntu 14.04.5), before running "npm publish", the file permissions are -rwxrwxr-- However, after…
takinola
  • 1,643
  • 1
  • 12
  • 23
3
votes
1 answer

copy html and css files to dist while maintaining the folder structure

I'm trying to npm publish my angular2 app which has the following structure. search-app config node_modules src api --index.ts --ping.ts --search.ts model --index.ts --model.ts web app …
RKG
  • 592
  • 1
  • 7
  • 23
3
votes
0 answers

npm unpublish 403 Err

I accidentally published wrong package. (less than 24 hours) So I tried to delete that version with this command: npm unpublish adm-trv@1.0.2 But I got this error: npm ERR! unpublish Failed to update data npm ERR! Darwin 15.6.0 npm ERR! argv…
MeTe-30
  • 2,512
  • 2
  • 21
  • 30
3
votes
0 answers

NPM - How to publish module with project .npmrc settings

I have a project specific npmrc which I added to the root of my project with the following settings registry= _auth = email = I then run npm publish but I still get the following error. + npm publish npm…
user3626708
  • 727
  • 2
  • 8
  • 24
2
votes
2 answers

NPM Publish error: You need to authorize this machine using npm adduser

I am trying to run npm publish on a package after I've upgraded to node v18 and npm v9. But I get the following error: This command requires you to be logged in to https://some-package.com:48082/nexus/repository/path1/ You need to authorize this…
Visovan Mihai
  • 337
  • 5
  • 10
2
votes
1 answer

Publish an NPM package to GitLab package registry

I followed the instructions in the GitLab docs to publish my project as a package to the project's registry. Here is my .gitlab-ci.yml file: image: node:18 stages: - publish publish: stage: publish rules: - if: $CI_COMMIT_BRANCH ==…
Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268
2
votes
1 answer

"npm ERR! invalid semver" while trying to publish npm package

npm ERR! code EBADSEMVER npm ERR! invalid semver: npm ERR! A complete log of this run can be found in: I've already tried re-install node and semver. It doesn't works
2
votes
1 answer

How to export my TS declarations to NPM package?

I do have some repositories that share some of the functionality. I'd like to export type declarations (and only those types) to NPM package, so that I can install them and use in couple of my projects. In root I do have /declarations folder, which…
mlvrkhn
  • 87
  • 1
  • 12
2
votes
0 answers

How can I use Vite to create a simple (one file) Typescript NPM package?

I would like to create a small open-source library and register it with NPM so that I can use it in my other projects. What is the best way to do this with Vite? The library is pretty simple, it is a one file of Typescript. Ideally I just need to be…
Dalibor Čarapić
  • 2,792
  • 23
  • 38
2
votes
1 answer

How to publish NPM package to NPM registry instead of github registry?

I have created an NPM package like so - (https://github.com/fyndreact/nitrozen) I'm able to successfully publish the package on github (https://npm.pkg.github.com/) However, what I want to do is publish it on NPM registry. I'm not able to see the…