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 install to support file:/// #6167

Closed
reggi opened this issue Jun 7, 2020 · 4 comments
Closed

deno install to support file:/// #6167

reggi opened this issue Jun 7, 2020 · 4 comments
Labels
cli related to cli/ dir feat new feature (which has been agreed to/accepted)

Comments

@reggi
Copy link

reggi commented Jun 7, 2020

When I try to install a path that is prefixed by file:/// (the output from import.meta.url when the file is a local file) it will have an unexpected result in the install file generated.

Here's an example of what I ran:

deno install -f --allow-read \
         --allow-write \
         --allow-run \
         --unstable \
         file:///Users/thomas/Desktop/projects/deno-media-library/media-library.ts

Here's what it saved:

#!/bin/sh
# generated by deno install
deno "run" "--allow-read" "--allow-write" "--allow-run" "--unstable" "file:///Users/thomas/Desktop/projects/deno-media-library/file:/Users/thomas/Desktop/projects/deno-media-library/media-library.ts" "$@"

I ran into a similar issue when using the path module and resolving the output from import.meta.url.

import * as path from "https://deno.land/std/path/mod.ts";
console.log(path.resolve(import.meta.url))
$> deno run --allow-read ./example.ts
Compile file:///Users/thomas/Desktop/projects/deno-media-library/example.ts
/Users/thomas/Desktop/projects/deno-media-library/file:/Users/thomas/Desktop/projects/deno-media-library/example.ts

deno 1.0.5
v8 8.4.300
typescript 3.9.2

@reggi reggi changed the title deno install to support file:/// paths / urls deno install to support file:/// Jun 7, 2020
@bartlomieju
Copy link
Member

This problem should be fixed by #5276

@bartlomieju bartlomieju added cli related to cli/ dir feat new feature (which has been agreed to/accepted) labels Jun 16, 2020
@sant123
Copy link

sant123 commented Oct 31, 2020

I'm trying to install a local module but I'm getting the following error:

image

No such file or directory (os error 2)

Just in case I have set the following environment variable:

export DENO_INSTALL_ROOT="$HOME/.deno"

Anyone has an idea of what's going on? Also I have tried with the file://protocol

image

Thanks.

Edit:

Seems DENO_INSTALL_ROOT directory must exists, so I removed the environment variable and everything works.

@lino-levan
Copy link
Contributor

#5276 got merged a while ago... I'm pretty sure this issue is resolved.

@crowlKats
Copy link
Member

This has been fixed, so closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli related to cli/ dir feat new feature (which has been agreed to/accepted)
Projects
None yet
Development

No branches or pull requests

5 participants