heroku-buildpack-deno icon indicating copy to clipboard operation
heroku-buildpack-deno copied to clipboard

Can't deploy to Heroku: "error: Module not found"

Open diguifi opened this issue 1 year ago • 2 comments

Hi! I've been using this buildpack for over a year now, but these last months, I can't seem to deploy.
Everytime I get this error on the build log:

error: Module not found "https://deno.land/std/ws/mod.ts".
    at file:///app/server.ts:2:45

Well, you might think "maybe you're a dumass and you should remove this non-existent dependency "ws/mod.ts" from your file server.ts at line 2"
But, there's no such dependency, heres my latest server.ts file.

I tried a lot of things, I checked and re-checked a lot of things, I even completely removed a dependency that in the end had nothing to do with the error.

Another very weird thing is, I tryed re-deploying the same branch, without changin anything and the build log gave me the same error, but in a different file (which is also not calling that dependency "ws/mod.ts" anywhere)

error: Module not found "https://deno.land/std/ws/mod.ts".
    at file:///app/server/clientHandler.ts:1:50

My last resort is coming here to ask for help.


Just in case it helps, here the entire build log:

-----> Building on the Heroku-22 stack
-----> Using buildpack: https://github.com/chibat/heroku-buildpack-deno
-----> https://github.com/chibat/heroku-buildpack-deno app detected
#=#=#                                                                         Archive:  /tmp/build_4d264e83/.heroku/bin/deno.zip
  inflating: /tmp/build_4d264e83/.heroku/bin/deno  
Deno was installed successfully to /tmp/build_4d264e83/.heroku/bin/deno
Manually add the directory to your $HOME/.bashrc (or similar)
  export DENO_INSTALL="/tmp/build_4d264e83/.heroku"
  export PATH="$DENO_INSTALL/bin:$PATH"
Run '/tmp/build_4d264e83/.heroku/bin/deno --help' to get started
Download https://deno.land/std/http/server.ts
Download https://deno.land/std/ws/mod.ts
Download https://deno.land/[email protected]/flags/mod.ts
Download https://deno.land/std/uuid/mod.ts
Warning Implicitly using latest version (0.148.0) for https://deno.land/std/http/server.ts
Download https://deno.land/[email protected]/http/server.ts
Warning Implicitly using latest version (0.148.0) for https://deno.land/std/ws/mod.ts
Download https://deno.land/[email protected]/ws/mod.ts
Warning Implicitly using latest version (0.148.0) for https://deno.land/std/uuid/mod.ts
Download https://deno.land/[email protected]/uuid/mod.ts
Download https://deno.land/[email protected]/async/mod.ts
Download https://deno.land/[email protected]/uuid/v1.ts
Download https://deno.land/[email protected]/uuid/v4.ts
Download https://deno.land/[email protected]/uuid/v5.ts
Download https://deno.land/[email protected]/testing/asserts.ts
Download https://deno.land/[email protected]/async/abortable.ts
Download https://deno.land/[email protected]/async/deadline.ts
Download https://deno.land/[email protected]/async/debounce.ts
Download https://deno.land/[email protected]/async/deferred.ts
Download https://deno.land/[email protected]/async/delay.ts
Download https://deno.land/[email protected]/async/mux_async_iterator.ts
Download https://deno.land/[email protected]/async/pool.ts
Download https://deno.land/[email protected]/async/tee.ts
Download https://deno.land/[email protected]/uuid/_common.ts
Download https://deno.land/[email protected]/_util/assert.ts
Download https://deno.land/[email protected]/bytes/mod.ts
Download https://deno.land/[email protected]/fmt/colors.ts
Download https://deno.land/[email protected]/testing/diff.ts
Download https://deno.land/[email protected]/bytes/equals.ts
error: Module not found "https://deno.land/std/ws/mod.ts".
    at file:///app/server.ts:2:45
-----> Discovering process types
       Procfile declares types -> web
-----> Compressing...
       Done: 34.5M
-----> Launching...
       Released v72
       https://tinyland-dev.herokuapp.com/ deployed to Heroku

diguifi avatar Jul 14 '22 00:07 diguifi

Could you try removing "--cached-only" option in the Procfile? https://github.com/tiny-devs/tiny-dungeon-online/blob/b55a024d9958b976b8e483019bc21531fd88ea26/Procfile

chibat avatar Jul 14 '22 03:07 chibat

Hi, thanks for answering! I tried it but got the same error unfortunately:
updated file build log:

-----> Building on the Heroku-22 stack
-----> Using buildpack: https://github.com/chibat/heroku-buildpack-deno
-----> https://github.com/chibat/heroku-buildpack-deno app detected
#=#=#                                                                         Archive:  /tmp/build_2ed20b12/.heroku/bin/deno.zip
  inflating: /tmp/build_2ed20b12/.heroku/bin/deno  
Deno was installed successfully to /tmp/build_2ed20b12/.heroku/bin/deno
Manually add the directory to your $HOME/.bashrc (or similar)
  export DENO_INSTALL="/tmp/build_2ed20b12/.heroku"
  export PATH="$DENO_INSTALL/bin:$PATH"
Run '/tmp/build_2ed20b12/.heroku/bin/deno --help' to get started
Download https://deno.land/std/http/server.ts
Download https://deno.land/std/ws/mod.ts
Download https://deno.land/[email protected]/flags/mod.ts
Download https://deno.land/std/uuid/mod.ts
Download https://deno.land/[email protected]/testing/asserts.ts
Warning Implicitly using latest version (0.148.0) for https://deno.land/std/uuid/mod.ts
Download https://deno.land/[email protected]/uuid/mod.ts
Warning Implicitly using latest version (0.148.0) for https://deno.land/std/http/server.ts
Download https://deno.land/[email protected]/http/server.ts
Warning Implicitly using latest version (0.148.0) for https://deno.land/std/ws/mod.ts
Download https://deno.land/[email protected]/ws/mod.ts
Download https://deno.land/[email protected]/fmt/colors.ts
Download https://deno.land/[email protected]/testing/diff.ts
Download https://deno.land/[email protected]/uuid/v1.ts
Download https://deno.land/[email protected]/uuid/v4.ts
Download https://deno.land/[email protected]/uuid/v5.ts
Download https://deno.land/[email protected]/async/mod.ts
Download https://deno.land/[email protected]/_util/assert.ts
Download https://deno.land/[email protected]/bytes/mod.ts
Download https://deno.land/[email protected]/uuid/_common.ts
Download https://deno.land/[email protected]/async/abortable.ts
Download https://deno.land/[email protected]/async/deadline.ts
Download https://deno.land/[email protected]/async/debounce.ts
Download https://deno.land/[email protected]/async/deferred.ts
Download https://deno.land/[email protected]/async/delay.ts
Download https://deno.land/[email protected]/async/mux_async_iterator.ts
Download https://deno.land/[email protected]/async/pool.ts
Download https://deno.land/[email protected]/async/tee.ts
Download https://deno.land/[email protected]/bytes/equals.ts
error: Module not found "https://deno.land/std/ws/mod.ts".
    at file:///app/server/clientHandler.ts:1:50
-----> Discovering process types
       Procfile declares types -> web
-----> Compressing...
       Done: 34.5M
-----> Launching...
       Released v74
       https://tinyland-dev.herokuapp.com/ deployed to Heroku

as a side note, I felt as if the build was suspiciously fast

diguifi avatar Jul 14 '22 19:07 diguifi