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

npm create astro@latest looks for... pnpm? #7379

Closed
1 task
arjunindia opened this issue Jun 12, 2023 · 7 comments · Fixed by #7435
Closed
1 task

npm create astro@latest looks for... pnpm? #7379

arjunindia opened this issue Jun 12, 2023 · 7 comments · Fixed by #7435
Assignees
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) pkg: create-astro Related to the `create-astro` package (scope)

Comments

@arjunindia
Copy link

arjunindia commented Jun 12, 2023

What version of astro are you using?

latest

Are you using an SSR adapter? If so, which one?

No

What package manager are you using?

npm

What operating system are you using?

Windows

What browser are you using?

Chrome

Describe the Bug

On running npm create astro@latest,

file:///C:/Users/user/AppData/Local/npm-cache/_npx/abdb4b598af046c4/node_modules/execa/lib/error.js:59
                error = new Error(message);
                        ^

Error: Command failed with exit code 1: pnpm config get registry
'pnpm' is not recognized as an internal or external command,
operable program or batch file.
    at makeError (file:///C:/Users/user/AppData/Local/npm-cache/_npx/abdb4b598af046c4/node_modules/execa/lib/error.js:59:11)
    at handlePromise (file:///C:/Users/user/AppData/Local/npm-cache/_npx/abdb4b598af046c4/node_modules/execa/index.js:119:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async getRegistry (file:///C:/Users/user/AppData/Local/npm-cache/_npx/abdb4b598af046c4/node_modules/create-astro/dist/index.js:228:31)
    at async file:///C:/Users/user/AppData/Local/npm-cache/_npx/abdb4b598af046c4/node_modules/create-astro/dist/index.js:279:20 {
  shortMessage: 'Command failed with exit code 1: pnpm config get registry',
  command: 'pnpm config get registry',
  escapedCommand: 'pnpm config get registry',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: "'pnpm' is not recognized as an internal or external command,\r\n" +
    'operable program or batch file.',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Node.js v18.16.0
npm ERR! code 1
npm ERR! path D:\htmlcss
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c create-astro

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Local\npm-cache\_logs\2023-06-12T16_42_49_111Z-debug-0.log
 htmlcss  npm create astro@latest
file:///C:/Users/user/AppData/Local/npm-cache/_npx/abdb4b598af046c4/node_modules/execa/lib/error.js:59
                error = new Error(message);
                        ^

Error: Command failed with exit code 1: pnpm config get registry
'pnpm' is not recognized as an internal or external command,
operable program or batch file.
    at makeError (file:///C:/Users/user/AppData/Local/npm-cache/_npx/abdb4b598af046c4/node_modules/execa/lib/error.js:59:11)
    at handlePromise (file:///C:/Users/user/AppData/Local/npm-cache/_npx/abdb4b598af046c4/node_modules/execa/index.js:119:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async getRegistry (file:///C:/Users/user/AppData/Local/npm-cache/_npx/abdb4b598af046c4/node_modules/create-astro/dist/index.js:228:31)
    at async file:///C:/Users/user/AppData/Local/npm-cache/_npx/abdb4b598af046c4/node_modules/create-astro/dist/index.js:279:20 {
  shortMessage: 'Command failed with exit code 1: pnpm config get registry',
  command: 'pnpm config get registry',
  escapedCommand: 'pnpm config get registry',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: "'pnpm' is not recognized as an internal or external command,\r\n" +
    'operable program or batch file.',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Node.js v18.16.0
npm ERR! code 1
npm ERR! path D:\htmlcss
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c create-astro

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Local\npm-cache\_logs\2023-06-12T16_43_24_485Z-debug-0.log

Link to Minimal Reproducible Example

Reproduction likely isn't possible on an online platform, but have the error logs instead: https://pastebin.com/raw/VG9qGsiD

Participation

  • I am willing to submit a pull request for this issue.
@bholmesdev bholmesdev added the - P3: minor bug An edge case that only affects very specific usage (priority) label Jun 12, 2023
@bholmesdev
Copy link
Contributor

Thanks for this @arjunindia! I know we rely on the which-pm-runs package to detect this. To be sure, does this error occur at the "install dependencies" CLI step or immediately at the start of the CLI?

@arjunindia
Copy link
Author

this happens right after:

Need to install the following packages:
  [email protected]
Ok to proceed? (y) y

So I guess yeah immediately

@bholmesdev
Copy link
Contributor

@arjunindia Ah interesting. Do you get this error using create for other starters as well? Ex. try npm create vite@latest

@arjunindia
Copy link
Author

npm create vite@latest works fine. Scaffolded a TS project yesterday and just now to test.

@bholmesdev bholmesdev self-assigned this Jun 12, 2023
@natemoo-re natemoo-re added the pkg: create-astro Related to the `create-astro` package (scope) label Jun 19, 2023
@bholmesdev
Copy link
Contributor

Think I have a fix! @arjunindia do you mind running this to verify?

npm create astro@next--pm-fix

@bholmesdev
Copy link
Contributor

Closed to merge into the latest patch. Let us know if the issue persists!

@arjunindia
Copy link
Author

It works great now! Thanks! Now I can keep using this amazing framework again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) pkg: create-astro Related to the `create-astro` package (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants