Troubleshooting GULP Build Task Failure in Visual Studio Team Services: Module Not Found Error

I've been working on setting up continuous integration for my project team. We are currently pushing an angular/node project to a git repository in Team Services. The build process runs smoothly until it encounters the gulp task. Before the gulp task, steps 1-3 are executed:

1. npm config set cache C:\Dev\nodejs\npm-cache --global
 2. npm install
 3. npm cache clean
 **4. gulp default** 
 5. deploy to azure 

We had to set up steps 1 & 2 because npm install was failing before I configured the cache.

Upon encountering an error, this is the output:

2016-04-28T17:51:21.0694993Z [command]C:\NPM\Modules\gulp.cmd default --gulpfile C:\a\1\s\PolicyUI\PolicyUI\gulpfile.js --packagePath=C:\a\1\a
2016-04-28T17:51:25.1707118Z module.js:338
2016-04-28T17:51:25.1707118Z     throw err;
2016-04-28T17:51:25.1717126Z     ^
2016-04-28T17:51:25.1717126Z Error: Cannot find module 'merge-stream'
2016-04-28T17:51:25.1717126Z     at Function.Module._resolveFilename (module.js:336:15)
2016-04-28T17:51:25.1727127Z     at Function.Module._load (module.js:278:25)
2016-04-28T17:51:25.1727127Z     at Module.require (module.js:365:17)
2016-04-28T17:51:25.1738110Z     at require (module.js:384:17)
2016-04-28T17:51:25.1747120Z     at Object.<anonymous> (C:\a\1\s\PolicyUI\PolicyUI\gulpfile.js:8:13)
2016-04-28T17:51:25.1747120Z     at Module._compile (module.js:460:26)
2016-04-28T17:51:25.1757124Z     at Object.Module._extensions..js (module.js:478:10)
2016-04-28T17:51:25.1757124Z     at Module.load (module.js:355:32)
2016-04-28T17:51:25.1767126Z     at Function.Module._load (module.js:310:12)
2016-04-28T17:51:25.1767126Z     at Module.require (module.js:365:17)

Even though merge-stream is present locally and functioning properly on my machine.

Does anyone have insights into why this failure occurs?

I'm curious if the build environment in Team Services operates within an isolated PowerShell environment during builds.

Answer №1

Our team also faced a comparable challenge recently. To resolve it, we had to manually adjust the PowerShell script to correctly reference the location of the gulp file. The default script we were using contained path inaccuracies. I suggest investigating this further as you may uncover some solutions.

Appreciate your attention to this matter.

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 installation of npm fails due to a conflict with the peer dependency version of [email protected]

Encountered an issue while attempting to install dependencies for this project, where the command npm install failed with the following error: > npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: & ...

Frontend-maven-plugin encounters issue during npm installation showing the error message 'npm ERR! cb() not invoked'

While attempting to utilize the frontend-maven-plugin for building a springboot + react project, I encountered an issue. The build runs successfully on my local machine, but fails when executed on a teamcity agent. In order to resolve this, I had to bypass ...

An issue occurred while trying to execute the `ionic serve` command, and the result of

Facing an issue with the ionic serve command - I keep getting the error message "Hmm, we can't reach this page" and when attempting to view the result of the ionic address command, there is no output. Any assistance in resolving this would be greatly ...

Issue encountered while running npm install #7884 - npm warns of locking error: EACCES

I encountered an error while trying to npm install concat-map. I have already tried adding sudo. npm install concat-map npm WARN locking Error: EACCES, open '/Users/mercadotecnia/.npm/_locks/concat-map-a127112b4f6ee84c.lock' npm WARN locking /U ...

After running `npm uninstall -g angular-cli`, I thought I had successfully removed angular-cli from my system. To my surprise, when I checked `ng --

What's the deal here? I uninstalled angular-cli globally on my laptop by running npm uninstall -g angular-cli, and now it's gone. But on my desktop, I can still use ng --version even after removing angular-cli globally. Any idea what's ha ...

Visual Studio build is disrupted by the presence of node_modules folder

I am currently in the process of integrating Angular (v4) into an existing ASP.NET MVC 4 application. Within this application, there is a project that includes Selenium Web Driver along with a web.config file. node_modules\selenium-webdriver\lib ...

What is preventing npm sass from compiling properly?

https://i.stack.imgur.com/ekbNW.png While making edits to my code, I've noticed that the sass-compiler isn't indicating any errors (red lines) or successful compilations (green lines). Can someone help me identify where I might be going wrong? ...

How can I set up a script to run automatically in App Center during the process between cloning the git repository and installing npm

To configure App Center to work with my monorepo React Native app, I am exploring options for inserting custom bash scripts between the automated git clone and npm install commands triggered by App Center. App Center automatically clones the linked project ...

The React project encountered a build failure following the execution of the npm run command, resulting in the error code ELIFCY

I encountered an error while attempting to run my React project on localhost. Is there anyone who can provide assistance? Here is the error log: C:\Users\Intel\Desktop\burger-project>npm start > <a href="/cdn-cgi/l/email-prote ...

A TypeError has occurred due to unescaped characters in the request path, caused by [ERR_UNESCAPED_CHARACT

On my Ubuntu system, I am receiving incoming HTTP requests from the URL below: http://<MY-IP>:3000/v1/projects/list Description: The issue I'm facing is that when I make the request, I encounter the following error in the terminal: TypeError [ ...

Issue: The module './build/Release/scrypt' could not be located

Currently, I am trying to expand my knowledge in JavaScript and Solidity by taking a Udemy course. Unfortunately, the course instructor has not kept the content updated and there is no longer any support available for answering questions. When attempting ...

Storing user data in node.js using the express-sessionTo save user data in

Using express and express-session with mysql on nodeJS has been successful for me. I managed to set up a cookie and session as well. Take a look at my code: app.use(cookieParser('3CCC4ACD-6ED1-4844-9217-82131BDCB239')); session({resave: true, s ...

Variables for NPM Configuration

After researching the best way to securely store sensitive information, I decided to utilize the config package and environment variables for added security. Here is how I implemented this setup: Created a config directory containing two files: default.js ...

Error message: When using Vue CLI in conjunction with Axios, a TypeError occurs stating that XX

I recently started working with Vue.js and wanted to set up a Vue CLI project with Axios for handling HTTP requests. I came across this helpful guide which provided a good starting point, especially since I plan on creating a large project that can be reus ...

Encountering a ETIMEDOUT error "ip address" when making a Node.js request

What I'm doing in the code I am currently reading a text file containing approximately 3500 links. Subsequently, I iterate through each link to filter out the relevant ones and make requests to retrieve their status codes, links, and page titles usin ...

Utilizing an NPM Mirror: A Comprehensive Guide

Oh no, the npm registry is experiencing issues once more, causing havoc with executing npm install. Query: What is the alternative method for using npm to fetch packages from npm mirrors? Can you suggest any reliable npm mirrors? ...

Encountering a problem while trying to execute npm run serve on a newly created Vue-CLI project

Struggling to execute npm run serve on a fresh vue Project made with the Vue CLI. I initiated the project using vue create app, navigated to the project directory cd app, and ran npm run serve, a routine I have followed in previous projects. However, start ...

Having trouble with parsing the .mjs module from Iconify in Vue 3 CLI project that utilizes the Composition API and TypeScript

Issue Update: After modifying the code from if(data.aliases?.[name2] !== void 0) to: if(data.aliases != null && data.aliases[name2] !== void 0) in the iconify .mjs file, I was able to resolve the error. However, this fix needs to be implemented in ...

What is the safest way to convert a local file path to a file:// URL in Node.js?

In my node.js application, I am faced with the task of converting local file paths into file:// urls. After some research, I came across the File URI scheme on Wikipedia and I believe that there must be a solution out there or perhaps even an npm module t ...

Error with Firebase on Apple's M1 Mac devices

I recently upgraded my MacBook Air to the M1 chip. Firebase was functioning properly until I updated firebase-tools from version 9.7.0 to 9.8.0 last week. Since the update, I encounter an error anytime I attempt to execute a "firebase" command. This quest ...