Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yeoman Generator not working on Node v17 and v18 #253

Comments

@frbuceta
Copy link

frbuceta commented May 4, 2022

Yeoman is not able to copy the templates to the generation folder. this.fs.copyTpl doesn't do its job

Code: https://github.com/loopbackio/loopback-next/tree/master/packages/cli
Crash Code: https://github.com/loopbackio/loopback-next/blob/0606fc3c1ea5516520f5a89ef914808ec151928d/packages/cli/lib/project-generator.js#L267-L270

  1) generator-loopback4:app
       without settings
         "before all" hook for "creates files":
     Uncaught Error: ENOENT: no such file or directory, scandir '/tmp/62bd0ab5fcd23418724adcd69416c09689064ac3/my-app/_.gitignore'
      at Object.readdirSync (node:fs:1413:3)
      at exports.readdir (node_modules/@mrmlnc/readdir-enhanced/lib/sync/fs.js:18:20)
      at Object.safeCall [as safe] (node_modules/@mrmlnc/readdir-enhanced/lib/call.js:24:8)
      at DirectoryReader.readNextDirectory (node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:78:10)
      at Readable.DirectoryReader.stream._read (node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:57:18)
      at Readable.read (node:internal/streams/readable:496:12)
      at readdirSync (node_modules/@mrmlnc/readdir-enhanced/lib/sync/index.js:27:21)
      at Function.readdirSyncStat (node_modules/@mrmlnc/readdir-enhanced/lib/index.js:34:10)
      at ReaderSync.dynamicApi (node_modules/yeoman-generator/node_modules/fast-glob/out/providers/reader-sync.js:64:24)
      at ReaderSync.api (node_modules/yeoman-generator/node_modules/fast-glob/out/providers/reader-sync.js:56:25)
      at ReaderSync.read (node_modules/yeoman-generator/node_modules/fast-glob/out/providers/reader-sync.js:41:32)
      at Array.map (<anonymous>)
      at getWorks (node_modules/yeoman-generator/node_modules/fast-glob/out/index.js:60:18)
      at Function.sync (node_modules/yeoman-generator/node_modules/fast-glob/out/index.js:15:17)
      at /home/fran/Projects/loopback/packages/cli/node_modules/yeoman-generator/node_modules/globby/index.js:137:51
      at Array.reduce (<anonymous>)
      at Function.module.exports.sync (node_modules/yeoman-generator/node_modules/globby/index.js:136:15)
      at EditionInterface.exports.copy (node_modules/yeoman-generator/node_modules/mem-fs-editor/lib/actions/copy.js:23:26)
      at EditionInterface.module.exports [as move] (node_modules/yeoman-generator/node_modules/mem-fs-editor/lib/actions/move.js:4:8)
      at AppGenerator.scaffold (lib/project-generator.js:267:13)
      at AppGenerator.scaffold (generators/app/index.js:135:26)
      at Object.<anonymous> (node_modules/yeoman-generator/lib/index.js:991:25)
      at /home/fran/Projects/loopback/packages/cli/node_modules/run-async/index.js:49:25
      at new Promise (<anonymous>)
      at /home/fran/Projects/loopback/packages/cli/node_modules/run-async/index.js:26:19
      at runLoop.add.once.once (node_modules/yeoman-generator/lib/index.js:992:11)
      at processImmediate (node:internal/timers:471:21)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment