You might be using incompatible version. The SOlution is to Either upgrade 
to gulp 4 or downgrade to an earlier node.

Refer to below article for more info:

https://stackoverflow.com/questions/55921442/how-to-fix-referenceerror-primordials-is-not-defined-in-node

Hope it Helps.

On Sunday, February 2, 2020 at 12:08:02 AM UTC+5:30, Navaneetha Krishnan S 
wrote:
>
> I'm getting this error *primordials is not defined* when I try to compile 
> my angular application.
>
> > gulp && rimraf dist
> fs.js:27const { Math, Object } = primordials;
>                          ^
> ReferenceError: primordials is not defined
>     at fs.js:27:26
>     at req_ (C:\..\node_modules\natives\index.js:143:24)
>     at Object.req [as require] (C:\..\node_modules\natives\index.js:55:10)
>     at Object.<anonymous> 
> (C:\..\node_modules\vinyl-fs\node_modules\graceful-fs\fs.js:1:37)
>     at Module._compile (internal/modules/cjs/loader.js:955:30)
>     at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
>     at Module.load (internal/modules/cjs/loader.js:811:32)
>     at Function.Module._load (internal/modules/cjs/loader.js:723:14)
>     at Module.require (internal/modules/cjs/loader.js:848:19)
>     at require (internal/modules/cjs/helpers.js:74:18)
> npm ERR! code ELIFECYCLE
> npm ERR! errno 1
> npm ERR! test.web@1.1.0 build:clean: `gulp && rimraf dist`
> npm ERR! Exit status 1
> npm ERR!
> npm ERR! Failed at the test.web@1.1.0 build:clean script.
> npm ERR! This is probably not a problem with npm. There is likely additional 
> logging output above.
>
> npm ERR! A complete log of this run can be found in:
> npm ERR!     
> C:\Users\..\AppData\Roaming\npm-cache\_logs\2020-01-31T23_35_26_855Z-debug.log
> npm ERR! code ELIFECYCLE
> npm ERR! errno 1
>
> My node version is : 6.13.4
>
> Gulp version is : gulp@3.9.1
>
> Angular Version of my application: "@angular/core": "6.1.10"
>
>
> I tried the following steps:
>
>    1. 
>    
>    I uninstalled nodejs and reinstalled, removed node_modules and run
>    2. 
>    
>    "npm install" removed npm-cache and npm folders under 
>    C:\Users..\AppData\Roaming\
>    
> When I try to run *npm install -g n* I get this below error
>
> npm ERR! code EBADPLATFORM
> npm ERR! notsup Unsupported platform for n@6.2.0: wanted 
> {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"})
> npm ERR! notsup Valid OS:    !win32
> npm ERR! notsup Valid Arch:  any
> npm ERR! notsup Actual OS:   win32
> npm ERR! notsup Actual Arch: x64
>
> npm ERR! A complete log of this run can be found in:
> npm ERR!     
> C:\Users\...\AppData\Roaming\npm-cache\_logs\2020-01-31T23_44_44_033Z-debug.log
>
> Any ideas how to resolve this issue?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/bcd43946-752a-4034-9842-fa641c0a4e00%40googlegroups.com.

Reply via email to