grunt-cli icon indicating copy to clipboard operation
grunt-cli copied to clipboard

Issues with Node v8 compatibility in new release

Open ethan-arreya opened this issue 1 year ago • 0 comments
trafficstars

Upon installing [email protected] into our Node 8 project we were getting errors with running Grunt. The v8flags dependency changed from ~3.2.0 to 4.0.

0.613 /usr/local/lib/node_modules/grunt-cli/node_modules/v8flags/index.js:84
0.613   var flags = Array.from(process.allowedNodeEnvironmentFlags);
0.613                     ^
0.613 
0.613 TypeError: Cannot convert undefined or null to object
0.613     at Function.from (native)
0.613     at getFlags (/usr/local/lib/node_modules/grunt-cli/node_modules/v8flags/index.js:84:21)
0.613     at /usr/local/lib/node_modules/grunt-cli/node_modules/v8flags/index.js:142:5
0.613     at /usr/local/lib/node_module...

They invoke process.allowedNodeEnvironmentFlags which wasn't introduced into Node until v10.10. If we attempt to set NODE_OPTIONS to circumvent the errors, the object on the process variable wouldn't exist .

ethan-arreya avatar Sep 11 '24 02:09 ethan-arreya