CLI error - missing files

Hi there,

Just trying to work through getting set up with Prismic and getting errors with the CLI.
It installs with no errors using yarn global add prismic-cli

I can also use:
prism --version after install and it returns prismic-cli/4.2.0 darwin-arm64 node-v17.0.1

However if I use any commands e.g. prismic new or prismic sm --add-storybook I get the following error:

node:events:368
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, scandir '/Users/timchesney/.config/yarn/global/node_modules/generator-prismic-angular2/lib/generators'
    at Object.readdirSync (node:fs:1390:3)
    at exports.readdir (/Users/timchesney/.config/yarn/global/node_modules/@mrmlnc/readdir-enhanced/lib/sync/fs.js:18:20)
    at Object.safeCall [as safe] (/Users/timchesney/.config/yarn/global/node_modules/@mrmlnc/readdir-enhanced/lib/call.js:24:8)
    at DirectoryReader.readNextDirectory (/Users/timchesney/.config/yarn/global/node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:78:10)
    at Readable.DirectoryReader.stream._read (/Users/timchesney/.config/yarn/global/node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:57:18)
    at Readable.read (node:internal/streams/readable:496:27)
    at readdirSync (/Users/timchesney/.config/yarn/global/node_modules/@mrmlnc/readdir-enhanced/lib/sync/index.js:27:21)
    at Function.readdirSyncStat (/Users/timchesney/.config/yarn/global/node_modules/@mrmlnc/readdir-enhanced/lib/index.js:34:10)
    at ReaderSync.dynamicApi (/Users/timchesney/.config/yarn/global/node_modules/fast-glob/out/providers/reader-sync.js:64:24)
    at ReaderSync.api (/Users/timchesney/.config/yarn/global/node_modules/fast-glob/out/providers/reader-sync.js:56:25)
Emitted 'error' event on Readable instance at:
    at emitErrorNT (node:internal/streams/destroy:164:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: '/Users/timchesney/.config/yarn/global/node_modules/generator-prismic-angular2/lib/generators'
}

Node.js v17.0.1

Any help resolving this would be appreciated.

Hi Tim,

Welcome to the community!

This is a known issue with the CLI and Node 17 and the team is already working on a fix:

For the moment you'll have to use Node 16.

Thanks.