Issue encountered while attempting to release an updated version of a package on npm

After updating the package version in my package.json, I attempted to republish it using npm. However, I encountered the following error:

npm ERR! publish Failed PUT 404
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "publish"
npm ERR! node v0.12.3
npm ERR! npm  v2.9.1
npm ERR! code E404

npm ERR! 404 missing : @psychodelicgod/npm
npm ERR! 404
npm ERR! 404 '@psychodelicgod/npm' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)

npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Michał Szydłowski\npm\npm-debug.log

Additionally, here is part of the content from my debug.log:


... [content from debug log]

I have tried various solutions suggested by others, but so far nothing has resolved the issue. Any new suggestions would be greatly appreciated.

Answer №1

#Ready to Share Your Code on npm Registry?

If you're ready to publish your code on the npm registry, the first step is creating an npm user account. You can find detailed instructions here. In summary,

npm adduser
npm login

Ensure your credentials are saved by running npm config ls and then proceed with

npm publish.

Testing Your Module Locally or Installing It

To test packaging your module locally or installing it, follow these steps:

tar -tf $(npm pack)
npm install <path/to/your/package.tgz>

You can also refer to this resource and this discussion for more information.

Answer №2

I encountered a similar issue where my email was not verified. I resolved it by logging into npmjs.org and verifying my email address.

Answer №3

I'm not sure what's going on with your code during the package installation process. You may want to refer to this resource: https://docs.npmjs.com/getting-started/creating-node-modules for guidance on how to install package modules. Here are some simple steps to help you install a package:

1. Publish your package to npm
2. Create a new directory outside of your project and navigate into it
3. Run npm install <package>
4. Write a test.js file that requires the package and calls its method
5. Execute node test.js. The expected message should be displayed.

Answer №4

After reviewing the log, I came across the following exception

36 error publish Failed PUT 404
37 verbose stack Error: missing : @psychedelicguru/npm

It appears that you may be logged out or you need to have registered npm adduser "psychedelicguru" as a username at the registry and be logged in to publish under that scope. Please refer to "Working with scoped packages" and "publishing NPM Packages" for more information.

Answer №5

Encountering 404 errors during the publishing process is often related to access issues. This can occur due to access token problems or read-write errors. Make sure to review your access settings on the organization package permissions page.

https://i.stack.imgur.com/jyV9H.png

  1. If this is your first time publishing from your local machine, use npm login to generate an access token for your account. Once you are logged in, the token will be automatically added to your global npmrc file, allowing you to attempt publishing again.
  2. If you encounter a 404 error while trying to update a package, ensure that you have granted read-write permission in your organization settings for the specific package.
  3. When using a CI/CD pipeline tool, it is essential to specify the scope and utilize an access token with read-write privileges.

Answer №6

Currently, there is a known bug in the implementation of the npm server on npmjs.org, where it fails to provide helpful information when a package fails to publish. If you are utilizing npmjs.org within an organizational context, make sure that your user's permissions are set to `read-write`. Although this may seem like common sense, the error message given might suggest that the repository being updated does not exist or is not visible to the user trying to publish. Despite being able to find the package through a search, the user may receive an error stating that the package does not exist when actually trying to publish it.

It's possible that your npm server also faces a similar issue.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to specify the stream responseType for my client?

Is there a way to download a file from my express js app using AJAX instead of server-side handling? const response = await Axios({ method: 'GET', url: url, responseType: 'stream' }) Instead of piping the data directly to ...

Is error propagation from nested Promise to parent Promise not working properly in Node.js?

I'm currently working on a Node.js/TypeScript API with Express. Below is a snippet from my get method where I encountered an error in the format function. The error is caught by the promise, but it doesn't propagate to the parent promise after th ...

Navigating directories and file locations in a Node/Express application

An example of my Node/Express app's file structure is shown below: /lib coolStuff.js /routes funRoute.js /views sickView.hbs app.js In the past, I have been using relative paths like var coolStuff = require('../lib/coolStuff'); to re ...

Sending information from Axios to Danfo using NextJs is seamless and efficient

I am currently developing a NextJs page where I have incorporated axios along with useState and useEffect to fetch JSON data from a web API and store it in a state called 'apiData'. .then((res) => { setApiData(res.data.Projects); conso ...

Error message: NodeJS informs you that the requested file could not be found

Just diving into the world of NodeJS, I find myself faced with a challenge on my login page. My goal is to validate users using a form submission. I decided to intercept the form submission and send an ajax request to my server (app.js) file. However, all ...

Steps to resolve the 'aws-cdk command not found' error post npm install

I'm currently in the process of setting up the aws-cdk on my system. I entered the command npm install -g aws-cdk into the terminal as instructed here. After npm completes the installation, the following output is displayed: /usr/local/Cellar/node/9. ...

NPM installation stalls only when attempting to install the specific package, ts-jest

https://i.stack.imgur.com/Cvon1.png I've encountered an issue while trying to set up ts-jest in a new project. Here's what I've tried: $ mkdir test && cd test $ npm init -y $ npm install ts-jest Despite being able to install other ...

Upon initiating a fresh project with npm create vite@latest and proceeding with npm install, an error message promptly surfaces

semver <7.5.2 Severity: moderate Potential vulnerability in semver due to Regular Expression Denial of Service - https://github.com/advisories/GHSA-c2qf-rxjj-qqgw A fix is available by using the command npm audit fix --force Running this may install [e ...

Utilizing Sequelize to search for existing items or create new ones in a list

My experience with sequelize is limited and I am having trouble understanding certain aspects. Despite my efforts to search for more information, I couldn't find anything specific that addresses my confusion. // API Method function SeederApi(req: Req ...

The node/express server is throwing an error due to an undefined parameter

What seems to be the issue with my string parameter? var express = require('express'); var app = module.exports = express(); var mongoose = require('mongoose'); var bodyParser = require('body-parser'); var braintree = require ...

"Compiling RethinkDB from source on Ubuntu: A step

While attempting to compile rethinkdb from source, I encountered the following error: npm WARN engine <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="73121e1716151a1d1633435d425d42">[email protected]</a>: wanted: ...

Encountering a problem on Heroku when attempting to upload images to mongoDB with Multer

I've created an application that allows users to upload images using multer and view them on the home screen. Locally, everything runs smoothly with MongoDB as the database. Even when using MongoDB CL locally, it works without any issues. However, onc ...

Guide to implementing error handling middleware in Express 4.x

Despite setting process.env.NODE_ENV ='development', I attempted to use middleware errorhandler, but it failed to work. Here is the server code: var express = require('express'); var app = express(); var errorhandler = require('e ...

send a notification to a social media platform topic using lambda

I am currently working on a lambda function designed to handle POST requests using AWS services. This function processes the body of the post request, performs a query, and then returns a response. MY LAMBDA FUNCTION const { Pool, Client } = require("pg" ...

Getting Information from Firebase Database Node.js Application Latest Addition

My application is designed to handle requests sent by users and store them in the Firebase Database. These requests are organized in the following way: https://i.stack.imgur.com/4q2PQ.png Requests are saved under user IDs within the requests category. In ...

Encountering an error on Linux while installing node: The version `GLIBC_2.27' required by node is not found at /lib64/libm.so.6

I recently tried to follow the steps outlined in this post about installing a node.tar.xz file in Linux: How to install node.tar.xz file in linux However, when I try running `node --version`, I encounter some errors. You can view the errors here. I&apos ...

Convert h264 video to GIF using Node.js

Currently, I'm utilizing the "pi-camera" library to successfully record video in a raw h264 format on my Raspberry Pi. However, I am encountering an issue with the node.js library "gifify" which keeps throwing the error "RangeError: Maximum call stack ...

npm encounters issues during dependency installation

I am currently experimenting with a resource I found on GitHub and need to set up the necessary dependencies for it. Upon running "npm install," I encountered the following error message. Last login: Sat Feb 19 20:41:00 on ttys000 jakob@Jakobs-MacBook-A ...

A guide to extracting text from HTML elements with puppeteer

This particular query has most likely been asked numerous times, but despite my extensive search, none of the solutions have proven effective in my case. Here is the Div snippet I am currently dealing with: <div class="dataTables_info" id=&qu ...

How can I move a complete range of values up using the Google Sheets API in Node.JS?

I'm working with a Google Spreadsheet that is being accessed and modified by a Node.JS app. There's a specific situation where I need to shift an entire range up (moving A3:D up by one cell), but due to my limited experience with the Google Shee ...