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

Getting a "EINVALIDPACKAGENAME" on fresh install #219

Closed
amyisdev opened this issue Jul 19, 2022 · 5 comments · Fixed by #220
Closed

Getting a "EINVALIDPACKAGENAME" on fresh install #219

amyisdev opened this issue Jul 19, 2022 · 5 comments · Fixed by #220
Labels

Comments

@amyisdev
Copy link
Contributor

amyisdev commented Jul 19, 2022

Describe the bug
After a fresh t3 install using the latest version, npm install fails because of invalid package name "[email protected]".

To Reproduce
Steps to reproduce the behavior:

  1. Run npx create-t3-app@latest
  2. Answer no to run npm install
  3. Then manually run it

Expected behavior
Dependencies should be installed with no failure

Screenshots
image

@juliusmarminge
Copy link
Member

Weird. Tested this out yesterday and was working fine.

Can you verify the version of:

  • create-t3-app (npx create-t3-app --version)
  • Node
  • npm

@juliusmarminge
Copy link
Member

Either answer yes to run npm install or manually run it

On second thought I believe this is incorrect and that this is a bug with the noInstall flag. Also test answering yes when prompted in the CLI.

@amyisdev
Copy link
Contributor Author

On second thought I believe this is incorrect and that this is a bug with the noInstall flag. Also test answering yes when prompted in the CLI.

Ah, my bad. You are right, looks like it only fails with the noInstall flag.

@juliusmarminge
Copy link
Member

juliusmarminge commented Jul 19, 2022

This is the failing line:

pkgJson.dependencies![pkg] = `^${latestVersion.trim()}`; //eslint-disable-line @typescript-eslint/no-non-null-assertion

This was introduced last night when locking the react-query to version 3:

We need to handle the case where the pkg already contains a version so that it isn’t included as the package’s name when added as a dependency.

Can fix it tonight if noone files a PR before then.

@juliusmarminge
Copy link
Member

Will publish 5.1.2 tonight containing the fix.

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

Successfully merging a pull request may close this issue.

2 participants