D
Deno
L
Deno
β’
14mo ago
β’
3 replies
lielmus
error: Relative import path "@std/http/file-server" not prefixed with / or ./ or ../
I
'm following this documentation to create a static files server
https://docs.deno.com/examples/file_server_tutorial/
There seems to be problem with the first line of the code
, which is
import
{ serveDir
} from
"
@std
/http
/file
-server
"
;
I am getting the error
error
: Relative import path
"
@std
/http
/file
-server
" not prefixed with
/ or
.
/ or
.
.
/
hint
: If you want to use a JSR or npm package
, try running
deno add jsr:@std/http/file-server
deno add jsr:@std/http/file-server
or
deno add npm:@std/http/file-server
deno add npm:@std/http/file-server
Which seems very strange to me
, as its a standard library import
, not anything relative
.
What am I doing wrong
?
Deno
Write a file server
In
-depth documentation
, guides
, and reference materials for building secure
, high
-performance JavaScript and TypeScript applications with Deno
Deno
Join
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Relative import path "ioredis" not prefixed with / or ./ or ../
B
bajosi / help
3y ago
The deployment failed: Relative import path "$fresh/server.ts" not prefixed with / or ./ or ../
O
Ooker / help
3y ago
Import from "@std/yaml/parse" or "@std/yaml" throwing relative path error.
I
IdeasAndAction / help
2y ago
'Relative import path not prefixed' error from @types/express .d.ts file?
R
rally25rs / help
3y ago