deployctl icon indicating copy to clipboard operation
deployctl copied to clipboard

action: Failed to open entrypoint file (ENOENT)

Open dwisiswant0 opened this issue 3 years ago • 7 comments

When I deploy a single file typescript, I get the error as Failed to open entrypoint file at 'file:///home/runner/work/REPOSITORY/REPOSITORY/server.js': ENOENT: no such file or directory, lstat '/home/runner/work/REPOSITORY/REPOSITORY/server.js' which is the file is in the root directory (so I don't need to supply root input). Why do I get this kind of behavior?

Here's my workflow file:

name: Build & Deploy

on:
  push:
    paths:
      - "server.ts"
      - "**.md"
    branches:
      - master
  workflow_dispatch:

jobs:
  deploy:
    permissions:
      id-token: write
      contents: read
    runs-on: ubuntu-latest
    steps:
      - name: Check out
        uses: actions/checkout@v3

      # MY BUILD STEPS HERE

      - name: Deploy to Deno Deploy
        uses: denoland/deployctl@v1
        with:
          project: REPOSITORY
          entrypoint: ./server.js

dwisiswant0 avatar Jul 03 '22 03:07 dwisiswant0

As the error message that left behind:

(node:2976) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

I guess the action should support arbitrary flags input.

dwisiswant0 avatar Jul 03 '22 03:07 dwisiswant0

I think it's because of #121?

dwisiswant0 avatar Jul 03 '22 03:07 dwisiswant0

Deno Deploy builds your typescript by default. You don't need to build your script on your own. Just specify server.ts as entrypoint.

(node:2976) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time (Use node --trace-warnings ... to show where the warning was created)

This warning looks like from node.js. Does your server.ts script work with deno? (like deno run --allow-net server.ts)

kt3k avatar Jul 04 '22 07:07 kt3k

@kt3k - yes it's work by my side, and I didn't use any Deno unstable API.

dwisiswant0 avatar Jul 06 '22 05:07 dwisiswant0

@dwisiswant0 What happens if you specify entrypoint: ./server.ts instead of entrypoint: ./server.js?

BTW why do you build your script on your own?

kt3k avatar Jul 06 '22 06:07 kt3k

This happens to me too: image

My yml file:

deploy:
    runs-on: ubuntu-latest
    needs: test
    permissions:
      id-token: write
      contents: read
    steps:
      - name: Deploy to Deno Deploy
        uses: denoland/deployctl@v1
        with:
          project: marcosadriano05-delivery
          entrypoint: ./src/main/server.ts

marcosadriano05 avatar Jul 07 '22 20:07 marcosadriano05

I had the same issue. The solution that worked for me was to "re-run failed jobs" in github.

xenofront avatar Nov 06 '22 15:11 xenofront