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 lockfile can't handle ">=2.0.0-rc.0" versions. #25649

Closed
birkskyum opened this issue Sep 15, 2024 · 4 comments · Fixed by #25660
Closed

Deno lockfile can't handle ">=2.0.0-rc.0" versions. #25649

birkskyum opened this issue Sep 15, 2024 · 4 comments · Fixed by #25660
Assignees
Labels
bug Something isn't working correctly

Comments

@birkskyum
Copy link
Contributor

birkskyum commented Sep 15, 2024

Version: deno 2.0.0-rc.2

I tried making a new Tauri 2 rc app:

npm create tauri-app@latest -- --rc

stepped through with defaults (deno isn't an option for package manager, so picked npm)

cd tauri2-app
deno install

Saw something about esbuild not running postinstall for security reasons:

Warning Packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed.
    This may cause the packages to not work correctly. To run them, use the `--allow-scripts` flag with `deno cache` or `deno install`
    (e.g. `deno cache --allow-scripts=pkg1,pkg2 <entrypoint>` or `deno install --allow-scripts=pkg1,pkg2`):
      npm:esbuild@0.21.5

I know it's firing an install.js script, and I actually wanted that, so I fired it myself:
deno install --allow-scripts=npm:esbuild

Error:

error: Failed reading lockfile at '/Users/admin/repos/deno-kitchensink/tauri2-app/deno.lock'

Caused by:
    0: Failed deserializing. Lockfile may be corrupt
    1: Invalid package requirement '@tauri-apps/api@>=2.0.0-rc.0'
    2: Invalid specifier version requirement
    3: Unexpected character.
         >=2.0.0-rc.0
         ~

Also comes with just deno install

@bartlomieju bartlomieju added the bug Something isn't working correctly label Sep 15, 2024
@bartlomieju
Copy link
Member

Isn't it switching between v1.x and 2.0 versions? The new lockfile is not backwards compatible - in Deno 2 it migrates automatically to version 4, but v1.x can't read it.

@birkskyum
Copy link
Contributor Author

Tried again to verify:

The deno version is deno 2.0.0-rc.2
The lockfile is version 4 - In this repro it's made directly from a package.json, not migrated from a previous lockfile.

@bartlomieju
Copy link
Member

@dsherret please take a look

@birkskyum
Copy link
Contributor Author

birkskyum commented Sep 15, 2024

Sidenote: I also never found the right syntax to make the deno run -A npm:create-tauri-app@latest -- --rc pick up on the --rc flag to make a Tauri 2 app. When I run the creation command with deno, I always end up with a Tauri 1 app, so that's why I used npm create -- --rc or pnpm create --rc (less dashed needed for pnpm apparently)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants