ReferenceError: primordials is not defined while running apigee2openapi

Hello everybody,

I'm getting the following error

ReferenceError: primordials is not defined at fs.js:35:5 at req_ (/usr/local/lib/node_modules/apigee2openapi/node_modules/natives/index.js:143:24) at Object.req [as require] (/usr/local/lib/node_modules/apigee2openapi/node_modules/natives/index.js:55:10) at Object.<anonymous> (/usr/local/lib/node_modules/apigee2openapi/node_modules/graceful-fs/fs.js:1:37) at Module._compile (internal/modules/cjs/loader.js:1158:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10) at Module.load (internal/modules/cjs/loader.js:1002:32) at Function.Module._load (internal/modules/cjs/loader.js:901:14) at Module.require (internal/modules/cjs/loader.js:1044:19)

while running the command apigee2openapi -d /myPath/

Can anyone help me please?

0 8 7,661
8 REPLIES 8

Try opening a GitHub issue. This tool only supported OAS v2.

Thank you Sai,

I finally solved this problem.

While this link discusses gulp, the fix is to choose a specific version of "graceful-fs" that works on Node.js 12: https://stackoverflow.com/questions/55921442/how-to-fix-referenceerror-primordials-is-not-defined-in...

Thank yo very much Jeremy,

I finally figured out by upgrading Node at the latest version and by installing graceful-fs 4.2.2.

how you solve the problem @Antonio ?

Hi Talha,

I solved the problem by upgrading Node at the latest version (13.11.0) and by installing graceful-fs 4.2.2.

A versions incompatibility must have been generated the ReferenceError as kindly explaned by @Jeremy Whitlock.

Thank you very much.

@Antonio you used OAS v2 or v3 ?