MapleLeaf šŸ
MapleLeaf šŸā€¢6d ago

`Module not found file:///src/main.ts` when trying to deploy

I try to deploy, but it fails looking for src/main.ts when I haven't even configured that
tale-tapestry on ī‚  main via šŸ¦• v2.1.1 via īœ˜ v20.18.0 took 4s
āÆ deployctl deploy --project=dry-squirrel-76 --include=dist
ā„¹ Using config file '/home/maple/dev/tale-tapestry/deno.json'
āš  No entrypoint provided with either the --entrypoint arg or a config file. I've guessed 'main.ts' for you.
ā„¹ Is this wrong? Please let us know in https://github.com/denoland/deployctl/issues/new
āœ” Deploying to project dry-squirrel-76.
āœ” Entrypoint: /home/maple/dev/tale-tapestry/main.ts
ā„¹ Uploading all files from the current dir (/home/maple/dev/tale-tapestry)
āœ” Found 9 assets.
āœ” No new assets to upload.
error: Uncaught (in promise) APIError: The deployment failed: Module not found "file:///src/main.ts".
throw new APIError(json.code, json.message, xDenoRay);
^
at API.#requestStream (https://jsr.io/@deno/deployctl/1.13.0/src/utils/api.ts:196:13)
at eventLoopTick (ext:core/01_core.js:175:7)
at async API.#requestJsonStream (https://jsr.io/@deno/deployctl/1.13.0/src/utils/api.ts:217:20)
at async deploy (https://jsr.io/@deno/deployctl/1.13.0/src/subcommands/deploy.ts:322:20)
at async default (https://jsr.io/@deno/deployctl/1.13.0/src/subcommands/deploy.ts:166:3)
at async https://jsr.io/@deno/deployctl/1.13.0/deployctl.ts:107:5

tale-tapestry on ī‚  main via šŸ¦• v2.1.1 via īœ˜ v20.18.0 took 3s
āÆ deployctl deploy --project=dry-squirrel-76 --include=dist --entrypoint=main.ts
ā„¹ Using config file '/home/maple/dev/tale-tapestry/deno.json'
āœ” Deploying to project dry-squirrel-76.
āœ” Entrypoint: /home/maple/dev/tale-tapestry/main.ts
ā„¹ Uploading all files from the current dir (/home/maple/dev/tale-tapestry)
āœ” Found 9 assets.
āœ” No new assets to upload.
error: Uncaught (in promise) APIError: The deployment failed: Module not found "file:///src/main.ts".
throw new APIError(json.code, json.message, xDenoRay);
^
at API.#requestStream (https://jsr.io/@deno/deployctl/1.13.0/src/utils/api.ts:196:13)
at eventLoopTick (ext:core/01_core.js:175:7)
at async API.#requestJsonStream (https://jsr.io/@deno/deployctl/1.13.0/src/utils/api.ts:217:20)
at async deploy (https://jsr.io/@deno/deployctl/1.13.0/src/subcommands/deploy.ts:322:20)
at async default (https://jsr.io/@deno/deployctl/1.13.0/src/subcommands/deploy.ts:166:3)
at async https://jsr.io/@deno/deployctl/1.13.0/deployctl.ts:107:5
tale-tapestry on ī‚  main via šŸ¦• v2.1.1 via īœ˜ v20.18.0 took 4s
āÆ deployctl deploy --project=dry-squirrel-76 --include=dist
ā„¹ Using config file '/home/maple/dev/tale-tapestry/deno.json'
āš  No entrypoint provided with either the --entrypoint arg or a config file. I've guessed 'main.ts' for you.
ā„¹ Is this wrong? Please let us know in https://github.com/denoland/deployctl/issues/new
āœ” Deploying to project dry-squirrel-76.
āœ” Entrypoint: /home/maple/dev/tale-tapestry/main.ts
ā„¹ Uploading all files from the current dir (/home/maple/dev/tale-tapestry)
āœ” Found 9 assets.
āœ” No new assets to upload.
error: Uncaught (in promise) APIError: The deployment failed: Module not found "file:///src/main.ts".
throw new APIError(json.code, json.message, xDenoRay);
^
at API.#requestStream (https://jsr.io/@deno/deployctl/1.13.0/src/utils/api.ts:196:13)
at eventLoopTick (ext:core/01_core.js:175:7)
at async API.#requestJsonStream (https://jsr.io/@deno/deployctl/1.13.0/src/utils/api.ts:217:20)
at async deploy (https://jsr.io/@deno/deployctl/1.13.0/src/subcommands/deploy.ts:322:20)
at async default (https://jsr.io/@deno/deployctl/1.13.0/src/subcommands/deploy.ts:166:3)
at async https://jsr.io/@deno/deployctl/1.13.0/deployctl.ts:107:5

tale-tapestry on ī‚  main via šŸ¦• v2.1.1 via īœ˜ v20.18.0 took 3s
āÆ deployctl deploy --project=dry-squirrel-76 --include=dist --entrypoint=main.ts
ā„¹ Using config file '/home/maple/dev/tale-tapestry/deno.json'
āœ” Deploying to project dry-squirrel-76.
āœ” Entrypoint: /home/maple/dev/tale-tapestry/main.ts
ā„¹ Uploading all files from the current dir (/home/maple/dev/tale-tapestry)
āœ” Found 9 assets.
āœ” No new assets to upload.
error: Uncaught (in promise) APIError: The deployment failed: Module not found "file:///src/main.ts".
throw new APIError(json.code, json.message, xDenoRay);
^
at API.#requestStream (https://jsr.io/@deno/deployctl/1.13.0/src/utils/api.ts:196:13)
at eventLoopTick (ext:core/01_core.js:175:7)
at async API.#requestJsonStream (https://jsr.io/@deno/deployctl/1.13.0/src/utils/api.ts:217:20)
at async deploy (https://jsr.io/@deno/deployctl/1.13.0/src/subcommands/deploy.ts:322:20)
at async default (https://jsr.io/@deno/deployctl/1.13.0/src/subcommands/deploy.ts:166:3)
at async https://jsr.io/@deno/deployctl/1.13.0/deployctl.ts:107:5
Same thing is happening in GitHub actions:
Run denoland/deployctl@v1
with:
project: dry-squirrel-76
root: ./
entrypoint: ./main.ts
include: ./dist
Project: dry-squirrel-76
Entrypoint: file:///src/main.ts
Uploading 0 file(s) (total 0 bytes)
Error: APIError: The deployment failed: Module not found "file:///src/main.ts".
Run denoland/deployctl@v1
with:
project: dry-squirrel-76
root: ./
entrypoint: ./main.ts
include: ./dist
Project: dry-squirrel-76
Entrypoint: file:///src/main.ts
Uploading 0 file(s) (total 0 bytes)
Error: APIError: The deployment failed: Module not found "file:///src/main.ts".
am i misunderstanding how the root and entrypoint options work? or is this a bug
1 Reply
MapleLeaf šŸ
MapleLeaf šŸOPā€¢6d ago
oh wait, does it not include the entrypoint by default? ...that appears to be the case, as the file runs when i --include=main.ts šŸ«  I love rubber ducking myself, but I hope this helps someone else lol