The installation of "npm" was completed successfully, however there seems to be an issue when

I am currently facing an issue while trying to set up http-server, bower, and grunt on my Windows machine. After successfully installing them using npm install, I encountered a 'command not found' error when attempting to run the commands. Even after restarting the command prompt and trying again, the same error persisted. The files are located in the appdata folders.

C:\Users\testuser>npm install http-server
+ <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f29a868682df819780849780b2c2dcc3c3dcc3">[email protected]</a>
updated 1 package in 5.713s

C:\Users\testuser>http-server
'http-server' is not recognized as an internal or external command,
operable program or batch file.

Upon verifying, I noticed that the service is installed:

C:\Users\testuser>npm list -g --depth=0
C:\Users\testuser\AppData\Roaming\npm
+-- <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="13717c64766153223d2b3d2b25f707e6f79767c79">[email protected]</a>
+-- <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="026a7676722f71677074677042326c626c7766414f50545f5459">[email protected]</a>
`-- <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7020071f03895c02140307140331411f01041e414b46400f030104">[email protected]</a>

Despite conducting searches for similar issues, I was unable to find a solution matching my problem.

Answer №1

 Use the command npm install http-server -g to globally install http-server.

By running this command, you will have access to run http-server directly from the command line.

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

Having trouble sorting data-text values that include colspan cells

Latest Update: Encountered an issue with incorrect sorting and frozen sortings when dealing with a cell containing the colspan attribute. Refer to https://jsfiddle.net/2zhjsn31/12/ where the problem arises for the date 2018-06-24 On https://jsfiddle.n ...

Creating interactive labels in a histogram that update based on the user's input

Currently, I have operational code in place that takes input data and generates a histogram based on set thresholds. When the code is executed, the histogram changes dynamically as the threshold slider is adjusted. However, there seems to be an issue wit ...

Crafting your personalized npm starter-kit: A step-by-step guide

Cutting-edge technology: Innovative node.js frameworks provide users with starter-kits that serve as project blueprints, like React's ready-to-use kit. When a user wishes to initiate a new react application, they can utilize the shortcut npx create-r ...

What could be causing postinstall to not run consistently?

In my package.json file, I have included the following JSON code at the bottom: "scripts": { "postinstall": [ "./node_modules/bower/bin/bower install && ./node_modules/protractor/bin/webdriver-manager update" ] } The purpose of th ...

Executing Node.js child processes: streaming stdout to console as it happens and running the processes one after the other

Details node: v9.4.0 I am looking for a solution to execute external commands sequentially while monitoring the stdout in real-time. The code snippet below demonstrates my attempt to retrieve all test cases from ./test/ and then running them one after ...

Error: Unable to locate Buffer2

I encountered the error Uncaught TypeError: Buffer2 is undefined when trying to import jsonwebtoken into my React project. The errors occur with both import jwt from jsonwebtoken and import {decode} from 'jsonwebtoken'. My versions are jsonwebt ...

Struggling with combining model and textures in three.js

Here in this fiddle, you can find an example of the issue I am facing: http://jsfiddle.net/saward/78Bjk/7/ If you uncomment scene.add(tree_mesh) and scene.add(mesh2), and comment out scene.add(mesh), you will be able to see both objects. However, when I m ...

parallax scrolling can be a bit bumpy

While working on a website, I've incorporated a slight parallax effect that is functioning almost perfectly. However, I've noticed that the foreground divs tend to jump a little when scrolling down the page. At the top of the page, there is a di ...

Enforcing object keys in Typescript based on object values

I'm looking to design a structure where the keys of an object are based on values from other parts of the object. For example: type AreaChartData = { xAxis: string; yAxis: string; data: { [Key in AreaChartData['xAxis'] | AreaChart ...

What enables typescript to be eligible for transpiling is its equivalent level of abstraction to javascript?

Transpilation is the act of converting code from one language to another with a similar level of abstraction. Can you point out some distinctive characteristics that indicate TypeScript transpires into JavaScript? ...

Steps for deactivating the submit button once confirming the presence of the username and email

When using AJAX to verify the existence of an email or username in the database, I want to deactivate the submit button if either one (or both) already exist. Currently, I have successfully changed the input border color but I am facing a challenge with t ...

Steps for updating text within an object in Angular

details = [ { event: "02/01/2019 - [Juan] - D - [Leo]", point: 72 }, { event: "02/01/2019 - [Carlo] - N - [Trish]", point: 92 } ]; I am attempting to modify the text within the titles that contain - N - or - D - The desired outcom ...

Ways to incorporate react suspense with redux toolkit

I am currently using Redux toolkit to display data from an API, and I want to show the user a "loading data..." message or a spinner before displaying the city information. I have been attempting to use React Suspense, but it doesn't seem to be worki ...

Is your blockui overlay failing to cover the entire page?

I have implemented blockui to display a "Wait ... loading" popup on my webpage. It is mostly working fine, but I am facing a small issue where the overlay does not cover the entire width of the scroll window when I scroll right (although it covers the full ...

Retrieving a specific Project ID from Asana Task API using Node.js and parsing the JSON response

Utilizing the Asana Task API, we have the capability to retrieve a task's associated projects along with their GID and Notes (description text). The main objective Our aim is to extract the GID of the project containing #websiteprojecttemplate in its ...

"Troubleshooting issue: Module fails to reload following JSON.parse error

For QA testing purposes, we have a test page that allows our QA team to replicate server behavior by passing JSON to a mock service. Everything functions correctly when valid JSON is used, but if invalid JSON is provided, an error is returned - which is ex ...

Display a loading component within the navbar in React while waiting for data to be retrieved

I recently updated my navbar component to accept dynamic values for menu titles. One of these dynamic values is the username, which needs to be fetched asynchronously. To handle this, I decided to display a loading animation until the username is fully fet ...

Extract data from a website with Python and selenium

I need to scrape the data from a table that seems to be generated in JavaScript. I'm using selenium and Python3 for this task. While looking at how others have approached similar challenges, I noticed they use xpath to locate the tables before scrapin ...

I am currently focusing on using websockets in combination with JavaScript and Golang servers to efficiently transmit files and

When front-end JavaScript websockets send a JSON object, it looks something like this: message_type: "1" to: "umesh" from: "moin" body: "" file: "{"filename":"reportesmtp.pdf" ,"fileextension":"application/pdf" ,"filesize":61813 ,"filedata ...

Javascript and the output of Ajax request

I'm facing an issue with my JavaScript files interacting with the response from an ajax request. It seems that the JavaScript is unable to read the response from the ajax call. My question is, how can I get my jQuery plugin to access the classes in t ...