Issues with using `npm install` on a compressed tarball package

Hello, I am currently attempting to globally install a module that I created using a gzipped tarball. After downloading the source from GitHub and converting it to a tar.gz file, I attempted to install it using the command below:

npm install forever.tar.gz -g

However, I encountered the following error message:

npm ERR! addLocal Could not install /home/administrator/forever.tar.gz
npm ERR! Error: ENOENT, open '/root/tmp/npm-18157/1367900009061-0.2676603845320642/package/package.json'

My main requirement is to avoid connecting to any external URLs, such as https://registry.npmjs.org/forever, for installation purposes. I need to be able to install directly from the tarball in my directory. I'm currently stuck at this point and would greatly appreciate any assistance.

Answer №1

If you encounter this error, it means that the package.json file within your tar archive could not be found...

Have you made any changes to your repository? How did you create the tarball for the repository?

I followed these steps and everything worked smoothly:

git clone https://github.com/nodejitsu/forever.git
tar -cvzf forever.tar.gz forever
npm install forever.tar.gz -g

Tip: You do not necessarily need to create a tarball of the repository; npm install can also be done with local folders:

git clone https://github.com/nodejitsu/forever.git
npm install forever/

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

The issue I'm facing with my webpack-build is the exclusive appearance of the "error" that

Hey everyone! I'm currently facing an issue with importing a module called _module_name_ into my React project, specifically a TypeScript project named react-app. The module was actually developed by me and it's published on npm. When trying to i ...

What's the reason behind Axios sending response in the format of [objects] [object]?

axios({ method: 'get', url: 'https://example.com/api/userdata', headers: { 'Auth': 'Bearer ' + authToken }, }).then(res => { console.log(res) }) The data is being fetched using the axios method and di ...

Partial Notification from Apple Subscription Received in Google Cloud Function

Setting up a Google Cloud Function (GCF) to handle Apple Subscription Notifications. I have experience with GCF but need help with writing my own REST API in Nodejs to handle the notification data sent by Apple. Currently, I am only receiving a partial chu ...

Ways to retrieve a value within a function and update a variable

Fetching data from the firebase database = firebase.database(); var ref = database.ref('urls'); ref.on('value', gotData, errData); function errData(err){ console.log('Error!'); console.log(err); } function gotData(d ...

Setting up NPM on Linux: A Comprehensive Guide

I've been successfully using node.js and npm on Windows, but when I tried to do the same on Linux, I encountered some challenges. My objective: To utilize node.js and npm on a Linux system. What I have done: I downloaded the tar.gz file from the o ...

When trying to use global.mongoose in Typescript, a type error is being thrown

I'm attempting to incorporate caching into my database connection file in order to streamline the process for my next.js application and avoid repeating the connection step every time I interact with the database. import mongoose from 'mongoose&a ...

Control the start and stop of an Express.js app in Node.js using PHP

I'm currently developing a web service using express.js in the node.js npm environment. In order to deliver this project to my client, I need to create a controller file that allows me to start and stop the server without having to use the command pr ...

Can you show me the method to retrieve the value of client.query in Node JS using PG?

I have been working with node.js to establish a database connection with postgresql. Here is what my dbConfig.js file looks like: var pg = require('pg'); var client = new pg.Client({ host:'myhoost', port:'5432', ...

Express JS causing NodeJS error | "Issue with setting headers: Unable to set headers after they have been sent to the client"

As I embark on my journey to learn the fundamentals of API development, I am following a tutorial on YouTube by Ania Kubow. The tutorial utilizes three JavaScript libraries: ExpressJS, Cheerio, and Axios. While I have been able to grasp the concepts being ...

The JSON data sent from the primary Electron process is arriving as undefined in the renderer

Currently delving into an Electron project to explore the technology. It's been a captivating and enjoyable experience so far as I work on creating a basic home controller for my IoT devices. However, I've encountered a minor issue. In my main.js ...

Tips for maintaining user sessions in Passport.js and PhoneGap: "remembering" a user after logging in

My Node.js server runs on the Sails.js framework, and I've successfully integrated passport.js to handle authentication. Here's how it works: (login)POST /auth/local: Validates credentials and returns ID, Username, and Email address. (register) ...

Is the 'Document' term not recognized within expressjs?

I'm having trouble implementing a query selector in an ExpressJS application and it's not working // search products router.post('/search', function(req, res) { var db = req.db; var elasticlunr = require(&apo ...

Issue encountered while attempting to execute the command "vue-cli-service serve" using Vue 3

ISSUE ENCOUNTERED During an attempt to update packages, I executed ncu -u, followed by npm install to apply the updates. However, I encountered difficulties as it seemed to cause problems with eslint. Despite trying to reproduce the error for further inve ...

How to make a GET request to a Node server using Angular

I am currently running a node server on port 8000 app.get('/historical/:days' ,(req,res,next){..}) My question is how to send a request from an Angular app (running on port 4200) in the browser to this node server. Below is my attempt: makeReq ...

The issue arises when using multiple route files in Route.js, as it hinders the ability to incorporate additional functions within the

After breaking down Route.js into multiple controllers, I'm stuck on why I can't add an extra function to block permissions for viewing the page. // route.js module.exports = function(app, passport) { app.use('/profile&apos ...

React Native Issue: Missing propType for native property RCTView.maxHeight

Upon upgrading to RN 0.30, I encountered the error message below even when trying to build the most basic app: react-native init AwesomeProject react-native run-ios What's peculiar is that the warnings include components BlurView, VibrancyView, an ...

Why is it necessary to use the exports "./package.json" declaration within package.json files?

Upon reviewing certain npm modules' package.json files, it caught my attention that some contain an exports section: { "name": "my-package", "exports": { ".": "./lib/index.js", "./package.json": "./package.json" } } I am curious about t ...

Just starting out with npm and wondering how you can work on a project locally without being connected to the internet

I'm diving into the world of npm and trying to grasp the basics. I recently downloaded an open source project called RailWrapper, which has a dependency on another open source project named rail-fares: "dependencies": { rail-fares: "^1.55" } Rai ...

Starting the stored procedure/function using the sequelize.query() method

Below is the stored procedure I have written: CREATE OR REPLACE FUNCTION GetAllEmployee() RETURNS setof "Employees" AS $BODY$ BEGIN RETURN QUERY select * from "Employees"; END; $BODY$ LANGUAGE plpgsql; I am attempting to execute this stored procedure fro ...

What is the process for displaying all indexes of a Mongo Collection using MongoDB Node native?

I am curious about how to retrieve all indexes from a specific collection in mongodb. I've tried using listIndexes, indexes, and indexInformation, but these methods only return empty values (arrays and objects). However, when I run db.getCollection(&a ...