npm-publish

How to set _auth for a scoped registry in .npmrc?

拈花ヽ惹草 提交于 2020-05-25 03:39:28
问题 I am wondering how to configure the .npmrc file so that I can have a default registry and a different scoped registry with authentication. I am using Nexus for the private repository and I am not sure how to set authentication for the scoped registry, only the default registry. For example my ~/.npmrc file is: registry=https://registry.npmjs.org/ @test-scope:registry=http://nexus:8081/nexus/content/repositories/npm-test/ email=test@user.com _auth="…" If I do npm publish for a package scoped

How to set _auth for a scoped registry in .npmrc?

放肆的年华 提交于 2020-05-25 03:39:06
问题 I am wondering how to configure the .npmrc file so that I can have a default registry and a different scoped registry with authentication. I am using Nexus for the private repository and I am not sure how to set authentication for the scoped registry, only the default registry. For example my ~/.npmrc file is: registry=https://registry.npmjs.org/ @test-scope:registry=http://nexus:8081/nexus/content/repositories/npm-test/ email=test@user.com _auth="…" If I do npm publish for a package scoped

How to make an NPM package that uses global types but doesn't augment the project using it?

江枫思渺然 提交于 2020-01-15 07:20:08
问题 The Question: Any project that reuses a lot of types in many different files can make use of types defined in a script file . Those types are visible globally across the project and don't need to be imported, see the official handbook: In TypeScript, just as in ECMAScript 2015, any file containing a top-level import or export is considered a module. Conversely, a file without any top-level import or export declarations is treated as a script whose contents are available in the global scope

How to generate NPM release candidate version

北城余情 提交于 2019-12-29 05:33:06
问题 Say I want to generate a pre-release NPM version. Originally I have this: "version": "0.0.1" I tried: npm version prepatch npm version prepatch npm version preminor npm version preminor that gave me this: v0.0.2-0 v0.0.3-0 v0.1.0-0 v0.2.0-0 Those don't look useful to me, because they always bump up the actual version number, meaning npm version patch and npm version prepatch don't seem to be making much difference. So my question is - is there an official way to generate an alpha/beta version

npm publish azure artifacts

此生再无相见时 提交于 2019-12-23 16:51:32
问题 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 entries: @my-scope:registry=https://pkgs.dev.azure.com/my-org/_packaging/my-feed/npm/registry/ @my-scope:always-auth=true In my global user .npmrc I have the following entries: prefix=/usr/local strict-ssl=false unsafe-perm=true //registry.npmjs.org/:_authToken="my-real-token" //pkgs.dev.azure.com/my-org/_packaging/my-feed/npm/registry/

Getting 404 when attempting to publish new package to NPM

≯℡__Kan透↙ 提交于 2019-12-22 05:07:26
问题 I just created a new package: https://github.com/supericium/pli I'm now trying to publish it to NPM for the first time like this: ole@MKI:~/Sandbox/pli$ npm publish --access public npm ERR! publish Failed PUT 404 npm ERR! Linux 3.13.0-93-generic npm ERR! argv "/home/ole/.nvm/versions/v6.4.0/bin/node" "/home/ole/.nvm/versions/v6.4.0/bin/npm" "publish" "--access" "public" npm ERR! node v6.4.0 npm ERR! npm v3.10.3 npm ERR! code E404 npm ERR! 404 Not found : @supericium/pli npm ERR! 404 npm ERR!

Getting 404 when attempting to publish new package to NPM

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 05:07:08
问题 I just created a new package: https://github.com/supericium/pli I'm now trying to publish it to NPM for the first time like this: ole@MKI:~/Sandbox/pli$ npm publish --access public npm ERR! publish Failed PUT 404 npm ERR! Linux 3.13.0-93-generic npm ERR! argv "/home/ole/.nvm/versions/v6.4.0/bin/node" "/home/ole/.nvm/versions/v6.4.0/bin/npm" "publish" "--access" "public" npm ERR! node v6.4.0 npm ERR! npm v3.10.3 npm ERR! code E404 npm ERR! 404 Not found : @supericium/pli npm ERR! 404 npm ERR!

npm publish causes 'Error: EPERM: operation not permitted, unlink …', errno -4048

喜你入骨 提交于 2019-12-21 03:08:18
问题 I'm trying to publish my NPM package: npm publish . I get the following quite cryptic error: npm ERR! path c:\Temp\npm-20936-b98f84c8\tmp\fromDir-02dd5394\package.tgz npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall unlink npm ERR! Error: EPERM: operation not permitted, unlink 'c:\Temp\npm-20936-b98f84c8\tmp\fromDir-02dd5394\package.tgz' npm ERR! at Error (native) npm ERR! { Error: EPERM: operation not permitted, unlink 'c:\Temp\npm-20936-b98f84c8\tmp\fromDir-02dd5394\package.tgz'

Getting “ReferenceError: jQuery is not defined” for package install on npm

陌路散爱 提交于 2019-12-12 02:25:45
问题 I have published a jRCarousel jQuery plugin to npm . I initially got the error that name can not contain capital letters, so I have changed that in package.json and then published it got published but on npm website when I try the "Try it out" option I get the "ReferenceError: jQuery is not defined" error. Not sure why is the error as I have specified the dependency in package.json. Also if there are any changes to only package.json and not to any other files in package or module , how can I

Issue with publishing to npm

你离开我真会死。 提交于 2019-12-11 00:17:49
问题 So I am trying to build an Open Source project using react and pushing it to npm. The issue is, my components, while they work great on a test environment - mounted to other components but when I publish it to npm and download the package and try to access it, it gives me an error. Here is a small sample of the code import React, {Component} from 'react'; import {Nav, NavBar, NavLink, NavItem} from 'react-bootstrap'; class GitNav extends Component{ handleSelect(eventKey){ window.location =