Skip to content

The CLI locally runs a project which won't work on the platform #866

@honzajavorek

Description

@honzajavorek

When I have a JavaScript project and forget to specify the start script in package.json, I can successfully apify run the project locally and then successfully apify push and build the project, but then I get a cryptic error when trying to run the Actor:

There was an uncaught exception during the run of the Actor and it was not handled.

2025-07-28T14:12:31.302Z ACTOR: Pulling Docker image of build P3CRdkV2wuFmFapfp from registry.
2025-07-28T14:12:31.304Z ACTOR: Creating Docker container.
2025-07-28T14:12:31.443Z ACTOR: Starting Docker container.

That's all, no more logs, no other info about what went wrong. Took me a moment to debug this and figure out that I didn't specify npm start, so the platform doesn't know what to start and how. Which is logical, but the DX isn't great. I'd appreciate if apify run would fail fast or at least warn me about it. Apparently it can infer how to start the project, but then such behavior differs from what the platform requires.

Metadata

Metadata

Assignees

Labels

t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions