Hello Everyone,
I am experiencing issues while trying to deploy my IDX project from GitHub. The project is configured using a dev.nix
file, but it seems to be failing during the build process.
The error message I receive is: Error: sh: line 1: ng: command not found
. It appears that the Angular CLI command ng
is not being recognized in the environment.
Here is the relevant section from my dev.nix
file:
{ pkgs, ... }: {
channel = "stable-23.11";
packages = [
pkgs.nodejs_20
pkgs.nodePackages.firebase-tools
];
idx = {
extensions = [
"angular.ng-template"
];
workspace = {
onCreate = {
npm-install = "npm install --no-audit --prefer-offline";
};
};
previews = {
enable = true;
previews = {
web = {
command = ["npm" "run" "start" "--" "--port" "$PORT" "--host" "0.0.0.0" "--disable-host-check"];
manager = "web";
};
};
};
};
}
I have tried adding @angular/cli
to my packages in the dev.nix
file, but I am still encountering the same issue. I have also tried clearing the npm cache and removing the node_modules
folder and package-lock.json
file, but to no avail.
Thank you in advance for your help.
Angular versione: 14.3.0