Skip to content

Remove package.json and deno.lock from Deno template #134

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

markmals
Copy link
Contributor

No description provided.

@markmals
Copy link
Contributor Author

Depends on remix-run/react-router#13744

@johnstonmatt
Copy link

this probably solves #132

@markmals
Copy link
Contributor Author

It will! Just waiting for an official release with the fix in order to open this PR.

@markmals markmals marked this pull request as ready for review June 27, 2025 19:59
@markmals
Copy link
Contributor Author

@brookslybrand I think this is ready to be merged now

@brookslybrand
Copy link
Contributor

Looks like the CLI also looks for a package.json 🙃

▲  Oh no! The provided template must be a React Router project with a `package.json` file, but that file does not exist in my-react-router-app.

@markmals markmals marked this pull request as draft July 2, 2025 16:24
@markmals
Copy link
Contributor Author

markmals commented Jul 2, 2025

@brookslybrand so, this one is trickier… create-react-router actually reads the package.json to verify that the template contains React Router packages:

    for (let dependency in dependencies) {
      let version = dependencies[dependency];
      if (
        (dependency.startsWith("@react-router/") ||
          dependency === "react-router" ||
          dependency === "react-router-dom") &&
        version === "*"
      ) {
        dependencies[dependency] = semver.prerelease(ctx.reactRouterVersion)
          ? // Templates created from prereleases should pin to a specific version
            ctx.reactRouterVersion
          : "^" + ctx.reactRouterVersion;
      }
    }

Should I add support for checking deno.json(c) as well or remove these checks altogether?

@brookslybrand
Copy link
Contributor

@markmals I think this PR might fix it

@markmals
Copy link
Contributor Author

Unfortunately, that PR did not fix it.

Screenshot 2025-07-16 at 2 47 59 PM

I can dive deeper and try to fix it. Do you have thoughts on the approach, re: my previous message @brookslybrand? Also, should we go ahead and merge this anyway since the current template fails also and it's not a regression of functionality?

@brookslybrand
Copy link
Contributor

That's annoying/weird. I haven't really looked into it enough to know what needs to be changed to fixed this. Basically whatever in the CLI that is checking for package.json just needs to be expanded I think

The current template works right now because it has a package.json. I'd prefer not to merge this one in because it will make it to where

npx create-react-router@latest --template remix-run/react-router-templates/deno

fails completely

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

Successfully merging this pull request may close these issues.

3 participants