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

fs errors when generating #55

Open
nickserv opened this issue Aug 23, 2022 · 2 comments
Open

fs errors when generating #55

nickserv opened this issue Aug 23, 2022 · 2 comments

Comments

@nickserv
Copy link
Contributor

nickserv commented Aug 23, 2022

I tried to generate a new project for @testing-library, but there are some fs errors. I think it's failing to copy files to the current directory before moving them, but I'm not sure why. Could there have been breaking changes in Yeoman since?

~ → mkdir example
~ → cd example
~/example → npx -p yo -p generator-kcd-oss -c 'yo kcd-oss'
? What do you want to name your module? example
? Should people install this as one of their devDependencies? Yes
? What's the project description? 
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, scandir '/Users/nick/example/gitattributes'
    at Object.readdirSync (node:fs:1450:3)
    at exports.readdir (/usr/local/lib/node_modules/generator-kcd-oss/node_modules/@mrmlnc/readdir-enhanced/lib/sync/fs.js:18:20)
    at Object.safeCall [as safe] (/usr/local/lib/node_modules/generator-kcd-oss/node_modules/@mrmlnc/readdir-enhanced/lib/call.js:24:8)
    at DirectoryReader.readNextDirectory (/usr/local/lib/node_modules/generator-kcd-oss/node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:78:10)
    at DirectoryReader.stream._read (/usr/local/lib/node_modules/generator-kcd-oss/node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:57:18)
    at Readable.read (node:internal/streams/readable:496:12)
    at readdirSync (/usr/local/lib/node_modules/generator-kcd-oss/node_modules/@mrmlnc/readdir-enhanced/lib/sync/index.js:27:21)
    at Function.readdirSyncStat (/usr/local/lib/node_modules/generator-kcd-oss/node_modules/@mrmlnc/readdir-enhanced/lib/index.js:34:10)
    at ReaderSync.dynamicApi (/usr/local/lib/node_modules/generator-kcd-oss/node_modules/fast-glob/out/providers/reader-sync.js:64:24)
    at ReaderSync.api (/usr/local/lib/node_modules/generator-kcd-oss/node_modules/fast-glob/out/providers/reader-sync.js:56:25)
Emitted 'error' event on Readable instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: '/Users/nick/example/gitattributes'
}

Node.js v18.7.0
~/example → yo doctor

Yeoman Doctor
Running sanity checks on your system

✔ No .bowerrc file in home directory
✔ Global configuration file is valid
✔ NODE_PATH matches the npm root
✔ No .yo-rc.json file in home directory
✔ Node.js version
✔ npm version
✔ yo version

Everything looks all right!
@kentcdodds
Copy link
Owner

Rats. No idea. I haven't used this in a long time and don't have time to look into it right now 😬

@nickserv
Copy link
Contributor Author

No worries, hopefully another contributor may have ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants