'NPM behaves differently when project is in another folder

I'm creating a Vue Frontend with a .Net Core 3.1 Backend, but when I try the command nmp run build in the project it exits with Code 1.

The weird part is: If I take the frontend app and put it in another parent folder it compiles successfully. It also works if I try it with PowerShell Version 7.

Error Message:

C:\Users\first.last\source\repos\Company.Project\Company.ProjectNew\project-frontend\node_modules\neo-async\async.js:16
    throw new Error('Callback was already called.');
    ^

Error: Callback was already called.
    at throwError (C:\Users\first.last\source\repos\Company.Project\Company.ProjectNew\project-frontend\node_modules\neo-async\async.js:16:11)
    at C:\Users\first.last\source\repos\Company.Project\Company.ProjectNew\project-frontend\node_modules\neo-async\async.js:2818:7
    at processTicksAndRejections (internal/process/task_queues.js:77:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\first.last\AppData\Roaming\npm-cache\_logs\2022-03-16T13_40_43_756Z-debug.log

The folder Structure:

Company.Project
   Company.ProjectNew <-- This is the .net Web App
      project-frontend <-- This is the vue porject
Company.Project.sln

Please help! I'M LOSING MY MIND!!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source