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 vendor doesn't work when lockfile contains npm specifiers #16778

Closed
sigmaSd opened this issue Nov 23, 2022 · 3 comments · Fixed by #19186
Closed

Deno vendor doesn't work when lockfile contains npm specifiers #16778

sigmaSd opened this issue Nov 23, 2022 · 3 comments · Fixed by #19186
Labels
bug Something isn't working correctly node compat vendor related to the vendor subcommand

Comments

@sigmaSd
Copy link
Contributor

sigmaSd commented Nov 23, 2022

import {} from "https://deno.land/std/path/mod.ts";

deno vendor a.ts
deno run -A --import-map vendor/import_map.json a.ts

error: Uncaught TypeError: Module not found "file:///home/mrcool/dev/deno/lab/qsdq/vendor/deno.land/[email protected]/node/module_all.ts".
    at async loadBuiltinNodeModules ([deno:cli/node/mod.rs:415:32]:2:25)
@dsherret
Copy link
Member

dsherret commented Nov 23, 2022

Do you have a lockfile with npm specifiers in it? The reproduction code you posted works fine.

@dsherret dsherret changed the title Deno vendor doesn't work any more Deno vendor doesn't work when lockfile contains npm specifiers Nov 23, 2022
@dsherret dsherret added bug Something isn't working correctly node compat vendor related to the vendor subcommand labels Nov 23, 2022
@dsherret
Copy link
Member

I investigated and am able to reproduce when there are npm specifiers in the lockfile. In some respects this is just deno vendor not having npm specifier support yet.

@sigmaSd
Copy link
Contributor Author

sigmaSd commented Nov 23, 2022

Ok, so I have a structure like this:

--../deno/----deno.json
         |--deno-projects

This makes my editor automatically detects that it should use deno lsp whenever I'm in any path under deno, but now running any deno file under deno projects actually creates the lock in the root directory adjacent to deno.json

I guess if all this is intended, I can just use another marker file to trigger my editor

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 node compat vendor related to the vendor subcommand
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants