Vue-cli-service build failed with async.js callback called multiple times

I am trying to build a .net app with SPA using vue. In Visual Studio I have no trouble to compile my project in both dev and prod. But when I try to build it with msBuild I have the following issue when it comes to run vue-cli-service build:

WePepsAdmin@0.1.0 build C:\Users\Thevenet\We-Peps\www\wepeps-admin\ClientApp
vue-cli-service build --report

  • Building for production…
    C:\Users\Thevenet\We-Peps\www\wepeps-admin\clientapp\node_modules\neo-async\async.js:16
    throw new Error(‘Callback was already called.’);
    ^
    EXEC : error : Callback was already called. [C:\Users\Thevenet\We-Peps\www\wepeps-admin\wepeps-admin.csproj]
    at throwError (C:\Users\Thevenet\We-Peps\www\wepeps-admin\clientapp\node_modules\neo-async\async.js:16:11)
    at C:\Users\Thevenet\We-Peps\www\wepeps-admin\clientapp\node_modules\neo-async\async.js:2818:7
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! WePepsAdmin@0.1.0 build: vue-cli-service build --report
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the WePepsAdmin@0.1.0 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\Thevenet\AppData\Roaming\npm-cache_logs\2021-07-11T21_11_38_501Z-debug.log

I tried to switch to a serve compilation instead with MSBuild and no problem occured. The only way I got the error is when I try to build it in prod.

Do you know where it can come from, or where should I look to have a lead on what’s going on here ?

Thanks

1 Like

Hit the same error today with production builds. Unfortunately I have not found a solution yet. Dev builds and serve builds work fine but production builds fail with the same message.

I found the issue.

The folder containing my vue project didn’t have the correct case. It was called ‘clientapp’ instead of ‘ClientApp’. It seems that the production build is case sensitive while the dev build is not… strange.

I would recommend you @ejc7f to check the naming of your folders and see if there is no issue with the case of your files and folders.

3 Likes

Thanks for sharing .I solved the issue by changing folders name into lowercase letter.

Love You… Thanks. I solved issue after hours. I just renamed project in small letters and it worked for me

Hi Gophys,
Thank you for helping me out, changing the name of the folder helped me out.

thanks a whole lot if fix it just by changing folder name