Npm is missing on buildtime

About the Issue

I’m currently building the Electron app for DogeHouse from source to be published in the Snap Store using CircleCI (Canonical’s Snapcraft Builds fails when installing electron npm package due to the domain github.com was not resolved, possibly the build servers are behind an firewall).

The only problem is the npm: command not found error in buildtime. Do somebody can point out what is the culprit? Maybe the node/14/stable snap be an culprit?

Links

My config: https://github.com/MadeByThePinsHub/dogehouse-electron-app-snap/blob/master/.circleci/config.yml

My snapcraft.yaml: https://github.com/MadeByThePinsHub/dogehouse-electron-app-snap/blob/master/snap/snapcraft.yaml

My build logs: https://app.circleci.com/pipelines/github/MadeByThePinsHub/dogehouse-electron-app-snap/8/workflows/0162a707-02a9-4f62-a1cf-7b704f8dede1/jobs/8/parallel-runs/0/steps/0-102

try setting the PATH in build-environment: like:

2 Likes

Thanks! I’ll look onto it!

But I can’t still build snap not because of the following warning from the logs:

The following snaps are required but not installed as snapcraft is running inside docker or podman container: node/14/stable, core18.
Please ensure the environment is properly setup before continuing.

…but because of /bin/sh: 42: npm: not found errorstill firing up. See https://app.circleci.com/pipelines/github/MadeByThePinsHub/dogehouse-electron-app-snap/10/workflows/4896c80c-5f2b-4082-b9ea-275b9dda337e/jobs/10/parallel-runs/0/steps/0-102.

Should I use build.snapcraft.io and configure NPM to use Canonical’s proxy instead?