Skip to content

No such file or directory (os error 2) #192

@xixixao

Description

@xixixao

When node is not on path, the backend now fails during deploy (before, like 6 months ago, I don't think Node was required during deploy).

  1. Is node needed for all deploys?
  2. Can we add better error handling?

For 2, it would probably suffice to change:

async fn check_node_version(node_path: &str) -> anyhow::Result<()> {
        let cmd = TokioCommand::new(node_path)
            .arg("--version")
            .output()
            .await?;

to

async fn check_node_version(node_path: &str) -> anyhow::Result<()> {
        let cmd = TokioCommand::new(node_path)
            .arg("--version")
            .output()
            .await
            .context("`node` is not on PATH")?;

Current error (quite cryptic):

Hit an error while pushing:                                                                                                             │
│ Failed to initialize inner local node executor                                                                                                                                            │
│                                                                                                                                                                                           │
│ Caused by:                                                                                                                                                                                │
│     0: Failed to initialize inner local node executor                                                                                                                                     │
│     1: No such file or directory (os error 2)                                                                                                                                             │
│                                                                                                                                                                                           │
│ Stack backtrace:                                                                                                                                                                          │
│    0: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from                                                                                                                │
│    1: <async_once_cell::InitFuture<T,F> as core::future::future::Future>::poll::{{closure}}                                                                                               │
│    2: <async_once_cell::InitFuture<T,F> as core::future::future::Future>::poll

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions