Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I diagnose why `npm publish` quietly does... nothing?

Tags:

node.js

npm

I've created a npm package following several different sets of instructions online. Here is what I have: https://github.com/joelarson4/CharFunk/blob/master/package.json

When I do an npm publish, I get a single newline of output (no errors, no anything). But from what I can tell, my package is not on npmjs.org. https://www.npmjs.org/package/CharFunk is an error page.

How can I figure out what I'm missing?

like image 662
jwl Avatar asked May 25 '14 21:05

jwl


People also ask

Why npm is too slow?

Summary. DO NOT USE YOUR OS PACKAGE MANAGER TO INSTALL NODE. JS OR NPM - You will get very bad results as it seems no OS is keeping these packages (not even close to) current. If you find that npm is running slow and it isn't your computer or internet, it is most likely because of a severely outdated version.

How do I test npm without publishing?

With your NPM package local to your machine, you'll need a way to reference/install it in the test application. Inside of the original NPM package directory, run npm link from the command line. This command will allow us to simulate installing this NPM package without it actually being published.

How do I fix dependencies in npm?

Npm has an audit functionality that can be used to identify which packages are responsible for the vulnerabilities. The easy fix is to use the npm audit --fix which will look for updates that can be updated to fix those automatically.

What is npm silly?

It stands for “silly” — the default log level that outputs a “silly” amount of information.


2 Answers

You solved your problem, but for others; You might see more information with:

npm publish --verbose
like image 115
Almer Avatar answered Oct 06 '22 19:10

Almer


You might have loglevel set to silent. Try doing

npm config set loglevel verbose --global

and then rerunning your npm commands to see if that gives more useful detail.

If not, try editing ~/.npmrc and setting

loglevel verbose

The extra information provided should help clarify the problem.

like image 27
jwl Avatar answered Oct 06 '22 18:10

jwl