denoland / denoland/deploy_feedback
[Bug]: Baffling "Module not found" Error
- Dominant language
- No language data
- Stars
- 79
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
### Problem description
When I try to deploy my Fresh application to Deno Deploy, I get the following error message:
```
Error The deployment failed: Module not found "file:///Library/Caches/deno/npm/registry.npmjs.org/@portabletext/types/2.0.7/dist/index.d.ts".
```
I'm assuming it has to do with the import that I've labeled "to-html" in my deno.json
deno.json
```
{
"lock": false,
"tasks": {
"check": "deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx",
"start": "deno run -A --watch=static/,routes/ dev.ts",
"build": "deno run -A dev.ts build",
"preview": "deno run -A main.ts",
"update": "deno run -A -r https://fresh.deno.dev/update ."
},
"lint": {
"rules": {
"tags": [
"fresh",
"recommended"
]
},
"exclude": [
"_fresh"
]
},
"fmt": {
"exclude": [
"_fresh"
]
},
"imports": {
"$fresh/": "https://deno.land/x/fresh@1.4.3/",
"preact": "https://esm.sh/preact@10.15.1",
"preact/": "https://esm.sh/preact@10.15.1/",
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.1",
"@preact/signals": "https://esm.sh/*@preact/signals@1.1.3",
"@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.2.3",
"twind": "https://esm.sh/twind@0.16.19",
"twind/": "https://esm.sh/twind@0.16.19/",
"$std/": "https://deno.land/std@0.193.0/",
"sanity": "https://esm.sh/@sanity/client",
"openai": "npm:openai@^4.0.0",
"to-html": "npm:@portabletext/to-html"
},
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "preact"
}
}
```
I've removed all the typing to my use of the toHTML method from the aforementioned NPM package. What's going on? Why is it trying to pull from my cache??
### Steps to reproduce
add "npm:@portabletext/to-html" to your dependencies
try to deploy
### Expected behavior
It should deploy fine.
### Environment
deno 1.37.1 (release, x86_64-apple-darwin)
v8 11.8.172.6
typescript 5.2.2
### Possible solution
_No response_
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.