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

🐛 Bug: Error: Failed migrating repository structure > updating local files on eslint-plugin-package.json (./knip.jsonc) #1015

Closed
3 tasks done
JoshuaKGoldberg opened this issue Nov 11, 2023 · 1 comment · Fixed by #1022
Assignees
Labels
status: accepting prs Please, send a pull request to resolve this! type: bug Something isn't working :(

Comments

@JoshuaKGoldberg
Copy link
Owner

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Expected

Running npx create-typescript-app@latest on JoshuaKGoldberg/eslint-plugin-package-json@a382e96 should succeed.

Actual

┌  ✨ Welcome to create-typescript-app 1.43.1! ✨
│
│  ⚠️ This template is early stage, opinionated, and not endorsed by the TypeScript team. ⚠️
│  ⚠️ If any tooling it sets displeases you, you can always remove that portion manually. ⚠️
│
◇  How would you like to use the template?
│  migrate the existing repository in the current directory
│
◇  What organization or user will the repository be under?
│  JoshuaKGoldberg
│
◇  What will the kebab-case name of the repository be?
│  eslint-plugin-package-json
│
◇  ✅ Passed checking GitHub authentication.
│
◇  How would you describe the new package?
│  Rules for consistent, readable, and valid package.json files. 🗂️
│
◇  What will the Title Case title of the repository be?
│  eslint-plugin-package-json
│
◇  Migrating repository structure...
│   - Clearing unnecessary files ✔️
│   - Writing structure ✔️
│   - Writing README.md ✔️
│   - Updating local files.│  ❌ Error migrating repository structure > updating local files.
│
Error: Failed migrating repository structure > updating local files
    at withSpinners (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/shared/cli/spinners.js:42:11)
    at async migrateWithOptions (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/migrate/migrateWithOptions.js:15:3)
    ... 4 lines matching cause stack trace ...
    at async file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/bin/index.js:4:20 {
  [cause]: Error: Failed to replace             "src/initialize/index.ts",
   with  in ./knip.jsonc
      at updateLocalFiles (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/steps/updateLocalFiles.js:49:13)
      at async file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/migrate/migrateWithOptions.js:32:9
      at async withSpinners (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/shared/cli/spinners.js:28:7)
      at async migrateWithOptions (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/migrate/migrateWithOptions.js:15:3)
      at async run (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/migrate/index.js:21:9)
      at async runOrRestore (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/shared/runOrRestore.js:7:5)
      at async Object.migrate (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/migrate/index.js:19:11)
      at async bin (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/bin/index.js:57:36)
      at async file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/bin/index.js:4:20 {
    [cause]: Error: No files match the pattern: ./knip.jsonc
        at /Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/replace-in-file/lib/helpers/glob-async.js:27:23
        at f (/Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/once/once.js:25:25)
        at Glob.<anonymous> (/Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/glob/glob.js:148:7)
        at Glob.emit (node:events:511:28)
        at Glob._finish (/Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/glob/glob.js:194:8)
        at done (/Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/glob/glob.js:179:14)
        at Glob._processSimple2 (/Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/glob/glob.js:688:12)
        at /Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/glob/glob.js:676:10
        at Glob._stat2 (/Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/glob/glob.js:772:12)
        at lstatcb_ (/Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/glob/glob.js:764:12)
  }
}
│
◆  Do you want to restore the repository to how it was?
│  ● Yes / ○ No
└
│   - Updating local files..

Additional Info

No response

@JoshuaKGoldberg JoshuaKGoldberg added type: bug Something isn't working :( status: accepting prs Please, send a pull request to resolve this! labels Nov 11, 2023
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Nov 11, 2023
@JoshuaKGoldberg JoshuaKGoldberg changed the title 🐛 Bug: Error: Failed migrating repository structure > updating local files on eslint-plugin-package.json 🐛 Bug: Error: Failed migrating repository structure > updating local files on eslint-plugin-package.json (./knip.jsonc) Nov 11, 2023
Copy link

🎉 This is included in version v1.43.3 🎉

The release is available on:

Cheers! 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: bug Something isn't working :(
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant