npm is unable to install a forked git repository in its current state

Attempting to install a customized version of ng2-smart-table on my application, but npm seems to be struggling with the process.

I've experimented with various commands such as

npm install git+http://github.com/myusername/ng2-smart-table.git
npm install git://github.com/myusername/ng2-smart-table.git
npm install github.com/myusername/ng2-smart-table

and many other iterations. However, I keep encountering the following error message.

npm ERR! addLocal Could not install /tmp/npm-24904-e690204a/git-cache-97763c70/bb5d603024d75ce8a664d949a646ca7c7c29b0a0
npm ERR! Linux 3.10.0-693.5.2.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "git://github.com/myusername/ng2-smart-table.git"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10

npm ERR! No version provided in package.json
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/myname/my-app/npm-debug.log
[root@stackc-pre-staging my-app]# vim /home/myname/my-app/npm-debug.log
[root@stackc-pre-staging my-app]# npm install git+http://github.com/myusername/ng2-smart-table.git
npm ERR! addLocal Could not install /tmp/npm-25075-02c22b92/git-cache-ba6c0ee9/bb5d603024d75ce8a664d949a646ca7c7c29b0a0
npm ERR! Linux 3.10.0-693.5.2.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "git+http://github.com/myusername/ng2-smart-table.git"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10

npm ERR! No version provided in package.json
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/myname/my-app/npm-debug.log

Full details available in /home/myname/my-app/npm-debug.log:

(Detailed log content)

Is this related to permissions? Or could there be an issue with how npm is configured? Any insights would be highly appreciated.

Answer №1

If you're encountering issues with your package.json file in the repository, try generating a new one using the npm init . command and carefully follow all the setup steps.
Ensure that the repository link is correctly specified in the repository section. I faced a similar issue and following the above steps resolved it for me.

Answer №2

Issue 1: The repository mentioned in your post cannot be found.

You may have provided an incorrect repository URL. Please make sure to use the correct repository URL: https://github.com/akveo/ng2-smart-table

Problem 2: No version is specified in the package.json file of the repository

To address this, you can fork the repository and include a version in the package.json file.

Alternatively, you can install using npm by running:

npm install --save ng2-smart-table

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

Leveraging the power of the Async pipe within an Angular TypeScript file

Using the async pipe in HTML involves utilizing the syntax "Products$ | async as products". But can we also access these same products in the TypeScript file? Is this possible? ...

`When you run `npm help X`, you will see a list of commands that are

For instance: $ npm help prune Best matches for "prune" —————————————————————————————————————————————————————————————————— ...

AngularJS allows for dynamic routing within applications

I'm a beginner with AngularJs and I've run into an issue where the URL changes but the page remains the same. Any help would be greatly appreciated. Here is my configuration: var app = angular.module('MyApp', ['ngResource',& ...

Executing testing using the npm command line

Currently, I have two distinct test suites - regular tests and coverage tests. As of now, I am configuring one to run with npm test and the other with npm start: "scripts": { "test": "node scripts/run-truffle-tests.js", "start": "node scripts/r ...

Switch up a JSON string using JavaScript

I received a JS string through an AJAX API call containing data like this: {"Task":"Hours per Day","Slep":22,"Work":25,"Watch TV":15,"Commute":4,"Eat":7,"Bathroom":17} My goal ...

How can I trigger my function in jQuery after inputting into the jQuery text field?

Looking for advice on implementing a function in jQuery for a text field that is not working as expected. The code works fine when creating a text field in HTML, but encounters issues with the jQuery text field. <!DOCTYPE html> <html> <body ...

Creating a list of components for drag and drop with Angular CDK is a straightforward process that involves following

I am attempting to use Angular's CDK drag and drop functionality to create a list of components that can be rearranged. However, I am encountering an issue where the components are not being displayed correctly. In my App.component.ts file: impo ...

Is It Possible to Determine If a Checkbox Has Been Checked?

Here's what I have now: I have a checkbox that I need to verify if it's selected. <input type="checkbox" name="person_info_check" value="0" &nbps>Read and agree!</input> However, the method I found online to verify the checkbox ...

Send a variable to the npm command's string parameter (and not to the script executed by the npm command)

Is it feasible to include an argument in the npm command string? I have searched through the documentation but couldn't find any relevant information. It would be advantageous for a wide audience to know how to do this. For instance, consider the fol ...

Using Telerik Grid in MVC to access the object that is passed to ClientEvent functions on the Javascript side

Here's a challenging question I have. I'm working with a Telerik Grid that has some ClientSide Events: .ClientEvents(events => events .OnDataBinding("SetAjaxParameter") ) Within the SetAjaxParameter function, I am setting parameters for ...

Vue.js behaving abnormally due to certain circumstances

Currently, I am working on a vue application where I encountered some errors related to script execution on certain websites. By implementing the following code snippet, the issue is resolved: if ( window.location.href === 'chrome-extension:// ...

How can state be efficiently communicated from a parent component to a child component in React?

As I embark on my first React project, I have encountered a recurring issue that has left me scratching my head. Whenever I pass state to a child component within an empty-dependency useEffect and then update the state, the child fails to reflect those cha ...

Guide on creating and dynamically appending an element to the DOM in VueJS triggered by a user clicking a button

I'm having an issue with my vue webapp. I want to make a square shape appear on the screen where a user clicks, but for some reason, my code isn't working as intended. Can someone help me figure out what's wrong? <template> <di ...

What is the best way to implement a constant countdown timer in JQuery that remains unaffected by page refreshes?

I have implemented a time countdown feature in my web app using this jQuery plugin. However, I am facing an issue where the countdown starts from the beginning every time the page is refreshed. I want the countdown to remain consistent for a month (30 days ...

Converting a Luxon DateTime object into a standard date

Currently, I am constructing a DatePicker React component utilizing the Material-UI picker library and integrating Luxon as an adapter. Whenever I modify the calendar date, I receive an object containing DateTime information as shown below: This is the co ...

Develop a versatile class for storing an array of key-value pairs (dictionary) using TypeScript

I am looking to implement a Dictionary class in my application. I have created a class with an Array of KeyValuePair to store my list. export class KeyValuePair<TKey, TVal>{ key:TKey; value:TVal; constructor(key:TKey, val:TVal){ this.key = key; ...

Error occurred in AngularJS service due to incorrect data type

Looking to store the URL of a query in an AngularJS service like this: var mortgageloanService = angular.module('loanstreetIpadAppApp', []); mortgageloanService.factory('updateTable', function($http) { return { getParams: fun ...

Harness the power of AngularJS by crafting your unique

Hey there! I'm having a bit of trouble figuring out why this isn't showing up. Both View1.html and View2.html are in the partials folder, so that's not the issue. Sometimes the screen is completely blank, other times I only see a Name: label ...

Establish height and width parameters for creating a dynamic and adaptable bar chart with recharts

I am currently facing an issue with recharts while trying to implement a BarChart. The setting width={600} and height={300} is causing the Barchart to be fixed in size, rather than responsive. How can I make the BarChart responsive? I attempted using per ...

Obtaining a complex object from a Checkbox set in AngularJS through the use of ngModel

Hey there! I've been searching on Stack Overflow regarding this topic, but I haven't found a solution that matches exactly what I need. If you want to take a look at the code, here is a JSFiddle link for reference: http://jsfiddle.net/gsLXf/1/ ...