Grunt >> ReferenceError: primordials is not defined

81 Views Asked by At

When trying to execute grunt --help , getting the following error Loading "bower_task.js" tasks...ERROR

ReferenceError: primordials is not defined

I am using node version ->V12.20.1 grunt version ->grunt-cli v1.4.3 grunt v0.4.1 bower version: 1.8.14

Please provide the solutions on how to fix this error.

Note: I tried installing npm install grunt-bower-task. I tried the steps mentioned in the How to fix "ReferenceError: primordials is not defined" in Node.js also. But no luck.

1

There are 1 best solutions below

1
Amala Rao On

The issue is resolved and I tried the following steps: --> installed node.js 10.24.0 rather than the higher version

npm install --save-dev npm install -g grunt-cli npm install bower --save-dev ( instead of npm install bower)

post the above steps, I am able to run the grunt tasks commands such as Grunt prepare, grunt copy