I had same issue with my project and I solved by downgrading the npm to v7.24.2, maybe the same will be available for v4. The npm v8.0 is in fact some alfa version, they stripped out programmatic api.
I had same issue with my project and I solved by downgrading the npm to v7.24.2, maybe the same will be available for v4. The npm v8.0 is in fact some alfa version, they stripped out programmatic api.