The term "primordials is not defined" is a common error

Whenever I attempt to run Gulp using the task runner, I am encountering this error message. I suspect it may be due to updating my npm project, but I'm unsure about how to resolve it. Should I try installing a different version of npm?

>Failed to run "C:\WebProjects\ITF\Tool.Web\Gulpfile.js"...
cmd.exe /c gulp --tasks-simple
fs.js:47
} = primordials;
^

The ReferenceError points out that 'primordials' is not defined at fs.js:47:5.

C:\WebProjects\ITF\Tool.Web>npm ls natives
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b0c4dfdfdcc3f0819e809e80">[email protected]</a> C:\WebProjects\ITF\Tool.Web
`-- <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="eb8c9e879babd8c5d2c5da">[email protected]</a>
  `-- <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="44322d2a3d2869223704746a776a75507f717a75">[email protected]</a>
    `-- <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0c6b7e6d6f696a7960216a7f4c367787a777b9104051a2110317">[email protected]</a>
      `-- <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6b050a1f021d0e182b5a455a455d">[email protected]</a>

Current Version:

C:\WebProjects\ITF\Tool.Web>npm -v
8.5.5

Answer №1

It appears that you are currently using Node.js 17.8.0 based on your npm version, which is the most up-to-date release. Unfortunately, Gulp 3 is not compatible with any of the actively supported versions of Node.js (check out the issue).

To resolve this issue, it is recommended to upgrade to Gulp 4.

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

Angular unable to retrieve data using Angularfire2

Having trouble retrieving data from the Real time Database on firebase. Read and Write permissions are set to public so no authentication is needed. The npm compilation is successful, indicating that the Angular-CLI code is correct. Following the document ...

Error in MEAN-Stack: Unable to retrieve data from second SQL table on the server

I am currently working on a WebApp using MEANStack, where I utilize Sequelize to interact with SQL Databases. While I have successfully implemented code to read from an SQL Table, I encountered an error when attempting to read from a second SQL Table. The ...

Creating a package exclusively for types on NPM: A step-by-step guide

I'm looking to set up a package (using either a monorepo or NPM) that specifically exports types, allowing me to easily import them into my project. However, I've run into some issues with my current approach. import type { MyType } from '@a ...

VSCode prioritizes importing files while disregarding any symbolic links in order to delve deeper into nested node

I'm encountering a problem with VSCode and TypeScript related to auto imports. Our application includes a service known as Manager, which relies on certain functions imported from a private npm package called Helpers. Both Manager and Helpers make us ...

Issue with esbuild not executing within docker compose configuration

Currently, I am new to using esbuild and struggling to set up a script that can watch and rebuild my files. Additionally, I need this functionality to work within a docker environment. Within my package.json file, the following scripts are defined: " ...

The use of Next.js v12 middleware is incompatible with both node-fetch and axios

I am facing an issue while developing a middleware that fetches user data from an external endpoint using Axios. Surprisingly, Axios is not functioning properly within the middleware. Below is the error message I encountered when using node-fetch: Module b ...

Encountering an i18next-fetch-backend issue during the transition to Angular 11

Encountering problems after upgrading to Angular 11 with the i18next-fetch-backend package's index.d.ts file. How can I troubleshoot this issue and what steps should I take to resolve it? Here is a snippet from the index.d.ts file: ...

The component prop of Typography in TypeScript does not accept MUI styling

Working with MUI in typescript and attempting to utilize styled from MUI. Encountering an error when passing the component prop to the styled component. The typescript sandbox below displays the issue - any suggestions for a workaround? https://codesandbo ...

Setting up eslint for your new react project---Would you like any further

I am currently working on a TypeScript-based React application. To start off, I used the following command to create my React app with TypeScript template: npx create-react-app test-app --template typescript It's worth noting that eslint comes pre-co ...

Mapping an array of keys to an array of properties using Typescript

Is there a way to achieve the following: type A = { a: string; b: number; c: boolean }; type B = ["b", "a"]; type C = MapProps<A, B> ?? // [number, string] The solution I have currently is: type C = {[key in B[number]]: A[key]} ...

How can you run a function in JavaScript or TypeScript that is stored as a string?

Is there a way to call a function that is stored as a string? For example: var dynamicFun = `function Hello(person) { return 'Hello' + person; }` In this case, the dynamicFun variable can store any function definition dynamically, such as: var ...

Using Higher Order Components in React with TypeScript to pass a component as a prop

Exploring the steps outlined in this guide: https://reacttraining.com/react-router/web/example/auth-workflow. Attempting to replicate the code: const PrivateRoute = ({ component: Component, ...rest }) => ( <Route {...rest} render={props = ...

What is the reason behind `ngAfterViewChecked` and `ngAfterContentChecked` being invoked twice?

import { AfterContentChecked, AfterViewChecked, Component } from '@angular/core'; @Component({ selector: 'app-root', template: '' }) export class AppComponent implements AfterViewChecked, AfterContentChecked { ngA ...

What is the best way to retrieve a specific area within an Angular Material table?

I am trying to implement a feature that allows users to select areas in an Angular table similar to Excel sheets. An example of what I mean can be seen in the image below: https://i.stack.imgur.com/CEGJk.png So far, I have managed to enable multi-selecti ...

Issue with Vue plugin syntax causing component not to load

I'm facing an issue with a Vue plugin that I have. The code for the plugin is as follows: import _Vue from "vue"; import particles from "./Particles.vue"; const VueParticles = (Vue: typeof _Vue, options: unknown) => { _Vue. ...

"Upload a video file and use JavaScript to extract and save the first frame as an image

I have a webpage where users can upload a video file, and the page will generate a thumbnail based on a timestamp provided by the user. Currently, I am focusing on generating the thumbnail from the FIRST frame of the video. Here is an example of my progr ...

Having trouble resolving the error "Cannot find name CSSTranslate" while working with VSCode and tsc? Let's tackle this issue together

My program runs smoothly in a development environment and appears flawless in VSCode, but I'm encountering issues with tsc pointing out unknown names and properties. It's puzzling because my file doesn't seem to have any problems in VSCode. ...

Leveraging async pipe along with ngIf

Given the status property defined and initialized as shown below: public status:Promise<String>; constructor() { this.status = this.getStatus(); } public getStatus():Promise<String>{ return new Promise((resolve,reject)=>{ ...

Angular TypeScript state management system

I am facing a challenge in connecting a controller to a state (using angular ui.router) where one way of writing it works, while the other does not. Successful example (with the controller registered under the module): this.$stateProvider .state(' ...

The absence of Index.ts in the TypeScript compilation cannot be resolved by simply including it

Upon integrating @fireflysemantics/slice into my Angular project, I encountered the following error: ERROR in ./node_modules/@fireflysemantics/slice/index.ts Module build failed (from ./node_modules/@ngtools/webpack/src/index.js): Error: /home/ole/Temp/fs ...