yeoman / generator-generator

Generate a Yeoman generator
1.22k stars 237 forks source link

ReferenceError: primordials is not defined #238

Closed mariohmol closed 4 years ago

mariohmol commented 4 years ago

Hi,

thanks for this code!

I'm used this generator and whem I run yo mynewgen I get this error:

? Would you like to enable this option? Yes
identical dummyfile.txt

I'm all done. Running npm install && bower install for you to install the required dependencies. If this fails, try running the command yourself.

audited 925 packages in 2.204s

2 packages are looking for funding
  run `npm fund` for details

found 39 vulnerabilities (12 low, 5 moderate, 22 high)
  run `npm audit fix` to fix them, or `npm audit` for details
evalmachine.<anonymous>:27
const { Math, Object } = primordials;
                         ^

ReferenceError: primordials is not defined
    at evalmachine.<anonymous>:27:26
    at Object.<anonymous> (/usr/local/lib/node_modules/bower/node_modules/graceful-fs/fs.js:11:1)
    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)
    at Object.<anonymous> (/usr/local/lib/node_modules/bower/node_modules/graceful-fs/graceful-fs.js:3:27)
    at Module._compile (internal/modules/cjs/loader.js:955:30)

Any ideas?

thanks

mariohmol commented 4 years ago

This happens in node v12 and v13,

with v11 i get a different error:

evalmachine.<anonymous>:25
'use strict';
^

ReferenceError: internalBinding is not defined
    at evalmachine.<anonymous>:25:1
    at Object.<anonymous> (/usr/local/lib/node_modules/bower/node_modules/graceful-fs/fs.js:11:1)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/usr/local/lib/node_modules/bower/node_modules/graceful-fs/graceful-fs.js:3:27)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
mariohmol commented 4 years ago

If I comment this part works..

  install() {
    // this.installDependencies();
  }