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! [email protected] build:clean: `gulp && rimraf dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 : [email protected]

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 [email protected]: 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/d00702e0-9391-4668-8327-2f63569fefb3%40googlegroups.com.

Reply via email to