Code Monkey home page Code Monkey logo

Comments (5)

khalibloo avatar khalibloo commented on May 24, 2024 1

I ran yarn create vite-pages app-demo --template app, which got the latest create-vite-pages. Then npm and pnpm just fixed themselves right after, and started fetching the latest version as well. I have no clue what caused the issue or why using yarn fixed npm and pnpm. It's also a bit concerning that npm init isn't guaranteed to fetch the latest versions of templates, but at least I'm unstuck for now. Thanks for your help!

from vite-plugin-react-pages.

csr632 avatar csr632 commented on May 24, 2024

It is fixed in the latest version. You can try it again! You can close this issue if it is fixed.

from vite-plugin-react-pages.

khalibloo avatar khalibloo commented on May 24, 2024

On the machine that produces this issue, creating a new vite-pages project still gives me a package.json like this https://github.com/khalibloo/vite-pages-esbuild-bug/blob/master/package.json with vite-plugin-react-pages version 2.x.
Any ideas why running the npm init would give me the old version of the template? I believe the init command should always fetch the latest template, right?

from vite-plugin-react-pages.

csr632 avatar csr632 commented on May 24, 2024

It may be a bug of npm's cache. (By the way, are you using a custom npm regiatery? That would also cause the problem.)

Try upgrading your npm version. Or delete npm cache.
This may be helpful: https://docs.npmjs.com/cli/v7/commands/npm-exec#a-note-on-caching

from vite-plugin-react-pages.

khalibloo avatar khalibloo commented on May 24, 2024

Nope, default configs for all 3 package managers. I suspected it might have been a cache issue with npm initially, given that i've used vite-pages on the machine with the issue a long time ago. But I just installed pnpm maybe 2 days ago. It didn't make sense that pnpm would also have the old create-vite-pages in its cache, unless it's somehow also using npm's cache behind the scenes. Oh and npm assured me that i shouldn't need to clean its cache when I tried to. So I quickly wrote that off.

Then I figured maybe it's the registry, and since yarn uses a different registry, that might work. And it did. Then I went back to npm to compare the outputs again and it also just worked. And so did pnpm. But I force-cleaned its cache anyway just for good measure.

from vite-plugin-react-pages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.