npm fails to be recognized in GitLab-CI when running on a Windows server runner

I'm attempting to set up a basic continuous integration on my Windows Server (Windows 2012R). The only instruction in my job script is: npm install. However, when I run the pipeline, I receive the following error message:

'npm' is not recognized as an internal or external command, operable program or batch file.

I understand that this error is related to not having node included in my environment variables. Interestingly, I don't experience this issue with a Linux server, so I suspect it has something to do with using a Windows environment...

Does anyone know what may be causing this problem?

Answer №1

I managed to locate the solution by including the path to node after initiating the runner process. It turned out that all it took was stopping the process and restarting it...

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

Error encountered on macOS Mojave M1 when trying to set global permissions for npm bin folder

After running the npm doctor command, here is the output I received: npm ERR! checkFilesPermission Missing permissions on /opt/homebrew/bin/.keepme (expect: executable) Check Value Recommendation/Notes npm ping ...

What could be causing webpack to fail to recognize the bootstrap4 and font-awesome modules?

Recently, I've been delving into webpack and exploring how to integrate various modules. I encountered an issue with two specific modules - bootstrap4 and font-awesome, as they were not getting recognized. After running npm install <module>, he ...

Setting up Node Sass

Setting up development for node-sass has been a challenge for me. Every time I run npm run sass, I encounter errors due to constantly receiving "6 packages are looking for funding" notifications. Additionally, I installed <a href="/cdn-cgi/l/email-pro ...

Having trouble with installing Material UI using NPM in your React project? Seeing an error message that says "Unable to

Since adding materialUI to my project, I've encountered a problem when attempting to run npm install on a create-react-app application. Despite deleting node_modules and package_lock.json multiple times, the issue persists. Although I can force-inst ...

Unable to create app using npx create-react-app appname

I'm encountering an error while trying to create a React app. Despite trying the following solutions, none of them worked for me: I updated my npm using the command below npm i -g npm@latest npm cache clear --force yarn cache clear npx create-rea ...

I am struggling with composing commands using npm

npm ERR! npm@5 has introduced a self-healing feature for cache corruption issues. npm ERR! Integrity mismatches are now treated as cache misses, ensuring that data retrieved from the cache is valid. If you npm ERR! want to ensure consistency, use `npm ...

Guide on utilizing the multer-imager npm package in node.js to upload and resize an image to an Amazon S3 bucket

/********app.js***********/ var express = require('express'), aws = require('aws-sdk'), bodyParser = require('body-parser'), multer = require('multer'), imager = require('multer-imager'), ...

What are the steps to installing the most recent node.js version on a Linux virtual machine?

Is there a way to install the latest node.js version on my Linux VM? Whenever I use apt install nodejs npm, it ends up installing node.js v10.24.0, which does not support npm. npm warns that it doesn't work with Node.js v10.24.0 It is suggested to u ...

Error: node-sass setup is unable to locate the installed msvs_version

Attempting to npm install node-sass with the command >> npm install node-sass. Having Visual Studio 2010 on my system (for certain reasons), I have discovered that I require C++ compilers from Visual Studio 2013 or newer. I attempted to install the ...

Executing an npm script with single quotes to safely handle user-provided input

Within my package.json file, I have the following structure: "scripts": { "run-me": "echo" } By executing the run-me script with a parameter enclosed in single quotes like this: npm run-script run-me '$40$30$20' The command that gets execu ...

npm fails with the error message 'ERR! callback() was not invoked'

While attempting to set up vue-cli on my system, I encountered an issue with the installation process. npm install -g @vue/cli The error message I received was: Unhandled rejection Error: EACCES: permission denied, mkdir '/home/moeketsi/.npm/_cac ...

The error was thrown at line 883 in the cjs/loader.js file of the

I'm encountering an error when trying to run npm start (I've included a screenshot of the error below) in my Angular project. However, everything works fine when I use ng serve. I've attempted multiple solutions to resolve this issue with ...

Unable to add items to the collection in NPM with Meteor 1.3

I have encountered an issue with the imap-simple NPM package while trying to perform an insert operation. Despite following the suggestions on , I am still unable to get the insert function to work properly! Even after simplifying the code and eliminatin ...

Getting rid of Glyphicons in Laravel 5.4

I am currently working on a project using laravel-5.4 and I need to remove Glyphicons from it. To achieve this, I executed the following command from the root folder of my project: npm uninstall glyphicons-halflings After running npm run production, the ...

Angular 8 encountered an error in content_script.js at line 71. The error was classified as a LEVEL: ERROR within the MODULE:

I am currently working on an Angular 8 application with Dotnet Core, and I have encountered a strange error message in the developer's console recently: content_script.js:71 LEVEL: ERROR | MODULE: LEAKED_CREDENTIALS | SESSION: a1293cfe | MESSAGE: &qu ...

The rating system does not accurately incorporate the values provided by the API

Incorporated the star rating package into my ReactJS code to showcase the star value retrieved from a mock API. import { Rating } from "react-simple-star-rating"; However, when attempting to make it read-only, it does become static but fails to ...

Is there a way to retrieve bookmarks (TOC) from a PDF document using technologies such as NodeJS, ReactJS, or PHP?

I'm sure most people have noticed that when you open a PDF in the browser or Acrobat PDF reader, a bookmarks tab appears like the one shown here: https://i.stack.imgur.com/obFer.png If the PDF doesn't have any bookmarks, the list will be empty. ...

"Stay up-to-date with the newest versions of Intellij Idea and WebStorm, including the latest N

It seems like my Node Packages are always falling behind, and I'm tired of spending so much time updating them. That's why I decided to explore all the possibilities with my go-to JetBrains IDEs & other tools to effectively monitor and update th ...

Issue encountered with Spatie/Browsershot in Laravel: npm and node were not located

After installing Spatie/Browsershot using composer, I encountered an error that seems beyond my expertise. Can anyone provide assistance? use Spatie\Browsershot\Browsershot; Browsershot::html('testing')->save('/public/assets/ ...

What could be causing the mysql-event to not function properly in a Node.js environment?

const MySQLEvents = require('mysql-events'); const databaseInfo = { host: 'localhost', user: 'root', password: '' //blank password }; const mysqlEventWatcher = MySQLEvents(databaseInfo); console.log(mys ...