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

Cannot deno publish with "vendor": true when importing remote https specifier #25640

Closed
rojvv opened this issue Sep 14, 2024 · 8 comments
Closed
Labels
invalid what appeared to be an issue with Deno wasn't publish Related to "deno publish" subcommand

Comments

@rojvv
Copy link
Contributor

rojvv commented Sep 14, 2024

Version: Deno 2.0.0-rc.2+af2d992

@lucacasonato lucacasonato added the needs investigation requires further investigation before determining if it is an issue or not label Sep 16, 2024
@lucacasonato lucacasonato added publish Related to "deno publish" subcommand jsr Issues or feature requests relating to JSR.io and removed jsr Issues or feature requests relating to JSR.io labels Sep 16, 2024
@dsherret
Copy link
Member

@rojvv I can't reproduce. Can you provide a reproduction? What error message do you get? Does it happen only when publishing and not a dry run?

@dsherret dsherret added needs info needs further information to be properly triaged and removed needs investigation requires further investigation before determining if it is an issue or not labels Sep 16, 2024
@dsherret dsherret removed their assignment Oct 21, 2024
@dsherret
Copy link
Member

dsherret commented Nov 8, 2024

Going to close because can't reproduce.

@dsherret dsherret closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2024
@rojvv
Copy link
Contributor Author

rojvv commented Nov 8, 2024

Hi, @dsherret.

I have prepared a minimal reproducible example, please re-open the issue:

https://github.com/rojvv/deno-25640

Apologies for the unexpectedly long delay.

@dsherret
Copy link
Member

dsherret commented Nov 8, 2024

What error message does that give?

@rojvv
Copy link
Contributor Author

rojvv commented Nov 8, 2024

Checking for slow types in the public API...
error[invalid-external-import]: invalid import to a non-JSR 'https' specifier
 --> /Users/roj/Projects/deno-25640/mod.ts:1:24
  | 
1 | import { concat } from "https://raw.githubusercontent.com/denoland/std/bf0ad522e873866764632b84f0e8460855f0d7e6/bytes/concat.ts";
  |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the specifier
  | 
  = hint: replace this import with one from jsr or npm, or vendor the dependency into your package

  info: the import was resolved to 'https://raw.githubusercontent.com/denoland/std/bf0ad522e873866764632b84f0e8460855f0d7e6/bytes/concat.ts'
  info: this specifier is not allowed to be imported on jsr
  info: jsr only supports importing `jsr:`, `npm:`, and `data:` specifiers
  docs: https://jsr.io/go/invalid-external-import

error: Found 1 problem

@dsherret dsherret changed the title Cannot deno publish with "vendor": true Cannot deno publish with "vendor": true when importing remote https specifier Nov 9, 2024
@dsherret
Copy link
Member

dsherret commented Nov 9, 2024

That's expected. You can't publish a package that relies on a remote https module (the "vendor": true feature only creates a local cache folder that's easily modifiable, but it's still treated as a remote specifier)

@dsherret dsherret added invalid what appeared to be an issue with Deno wasn't and removed needs info needs further information to be properly triaged labels Nov 9, 2024
@rojvv
Copy link
Contributor Author

rojvv commented Nov 9, 2024

@dsherret Why was this possible before 2.0?

@dsherret
Copy link
Member

dsherret commented Nov 9, 2024

It wasn't with "vendor": true. With deno vendor it was sometimes possible because that updates the import map (which was not as much of a reliable way of vendoring for apps).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid what appeared to be an issue with Deno wasn't publish Related to "deno publish" subcommand
Projects
None yet
Development

No branches or pull requests

3 participants