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

deno -A npm:create-vite@latest doesn't use latest version #28148

Open
kuchta opened this issue Feb 17, 2025 · 4 comments
Open

deno -A npm:create-vite@latest doesn't use latest version #28148

kuchta opened this issue Feb 17, 2025 · 4 comments
Labels
question a question about the use of Deno

Comments

@kuchta
Copy link

kuchta commented Feb 17, 2025

Version: 2.1.10

Running -A npm:create-vite@latest initializes projects with old (non-latest) version.

@dsherret dsherret added the question a question about the use of Deno label Feb 17, 2025
@dsherret
Copy link
Member

dsherret commented Feb 17, 2025

Can you run with the deno run --reload -A npm:create-vite@latest flag? Otherwise it will use your cached version.

@dsherret
Copy link
Member

Also, I think you can use deno init --npm vite nowadays instead of that longer command. Probably that should implicitly run with the --reload flag.

@kuchta
Copy link
Author

kuchta commented Feb 17, 2025

Hi @dsherret. deno run --reload did the job, but deno init seems not to reload the cache, unfortunatelly...

If I understand it correctly, then running deno cache -r npm:create-vite before should also do the job, right?

BTW, is there a way to reload everything, or all npm modules, since the following doesn't work (as it probably should, according to documentation`

$ deno cache -h
...
  -r, --reload[=<CACHE_BLOCKLIST>...]  Reload source code cache (recompile TypeScript)
                                         no value                                                 Reload everything
                                         jsr:@std/http/file-server,jsr:@std/assert/assert-equals  Reloads specific modules
                                         npm:                                                     Reload all npm modules
                                         npm:chalk                                                Reload specific npm module
...
$ deno cache -r 
error: the following required arguments were not provided:
  <file>...

Usage: deno cache --reload[=<CACHE_BLOCKLIST>...] <file>...
$ deno cache -r npm:
error: Invalid package specifier 'npm:'
    0: Did not contain a package name

@dsherret
Copy link
Member

BTW, is there a way to reload everything, or all npm modules, since the following doesn't work (as it probably should, according to documentation`

You need to provide deno cache <entrypoint> with an entrypoint for it to cache/reload (so that could be a file in your project that uses the dependencies, ex. deno cache -r some_file.ts). I think for that scenario of just reloading all npm/jsr packages specified in the deno.json or package.json you can use deno install --reload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question a question about the use of Deno
Projects
None yet
Development

No branches or pull requests

2 participants