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: pnpm initialize error in a template-created repository: Cannot find module lib/bin/index.js #1362

Open
3 tasks done
JoshuaKGoldberg opened this issue Mar 2, 2024 · 0 comments
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 pnpm i then pnpm initialize in a repository newly created & cloned from the template should work.

Actual

joshgoldberg ~/repos/github-notifications-prune $ pnpm initialize

> create-typescript-app@1.57.8 initialize /Users/josh/repos/github-notifications-prune
> tsx ./bin/index.js --mode initialize


node:internal/process/esm_loader:34
      internalBinding('errors').triggerUncaughtException(
                                ^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/josh/repos/github-notifications-prune/lib/bin/index.js' imported from /Users/josh/repos/github-notifications-prune/bin/index.js
    at finalizeResolution (node:internal/modules/esm/resolve:264:11)
    at moduleResolve (node:internal/modules/esm/resolve:917:10)
    at defaultResolve (node:internal/modules/esm/resolve:1130:11)
    at nextResolve (node:internal/modules/esm/hooks:865:28)
    at d (file:///Users/josh/repos/github-notifications-prune/node_modules/.pnpm/tsx@4.7.1/node_modules/tsx/dist/esm/index.mjs:5:34)
    at O (file:///Users/josh/repos/github-notifications-prune/node_modules/.pnpm/tsx@4.7.1/node_modules/tsx/dist/esm/index.mjs:5:1162)
    at nextResolve (node:internal/modules/esm/hooks:865:28)
    at Hooks.resolve (node:internal/modules/esm/hooks:303:30)
    at MessagePort.handleMessage (node:internal/modules/esm/worker:196:24)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:826:20) {
  code: 'ERR_MODULE_NOT_FOUND',
  url: 'file:///Users/josh/repos/github-notifications-prune/lib/bin/index.js'
}

Node.js v20.11.0
 ELIFECYCLE  Command failed with exit code 1.

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 Mar 2, 2024
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

No branches or pull requests

1 participant