I'm trying to build a cordova app in Visual Studio 2017, all dependencies are installed, and am getting this error when I try to build the app:

Running command: cmd "/s /c "C:\Users\150987\source\repos\PedMobile\DSM.DataHub\DSM.PedMobileOff\platforms\android\cordova\build.bat --release --buildConfig=C:\Users\150987\source\repos\PedMobile\DSM.DataHub\DSM.PedMobileOff\build.json""
1>MSBUILD : cordova-build error : C:\Users\150987\source\repos\PedMobile\DSM.DataHub\DSM.PedMobileOff\node_modules\fs-extra\lib\fs\index.js:93

Command finished with error code 1: cmd /s /c "C:\Users\150987\source\repos\PedMobile\DSM.DataHub\DSM.PedMobileOff\platforms\android\cordova\build.bat --release --buildConfig=C:\Users\150987\source\repos\PedMobile\DSM.DataHub\DSM.PedMobileOff\build.json"
1>MSBUILD : cordova-build error : exports.write = function (fd, buffer, ...args)
1>MSBUILD : cordova-build error :  ^^^
1>MSBUILD : cordova-build error : SyntaxError: Unexpected token ...
1>MSBUILD : cordova-build error :  at exports.runInThisContext (vm.js:53:16)
1>MSBUILD : cordova-build error :  at Module._compile (module.js:373:25)
1>MSBUILD : cordova-build error :  at Object.Module._extensions..js (module.js:416:10)
1>MSBUILD : cordova-build error :  at Module.load (module.js:343:32)
1>MSBUILD : cordova-build error :  at Function.Module._load (module.js:300:12)
1>MSBUILD : cordova-build error :  at Module.require (module.js:353:17)
1>MSBUILD : cordova-build error :  at require (internal/module.js:12:17)
1>MSBUILD : cordova-build error :  at Object.<anonymous> (C:\Users\150987\source\repos\PedMobile\DSM.DataHub\DSM.PedMobileOff\node_modules\fs-extra\lib\index.js:6:3)
1>MSBUILD : cordova-build error :  at Module._compile (module.js:409:26)
1>MSBUILD : cordova-build error :  at Object.Module._extensions..js (module.js:416:10)
1>MSBUILD : cordova-build error : Error: cmd: Command failed with exit code 1

Any clues? Maybe install some other dependency?

Tried to remove node-modules folder, reinstall everything again, reload the project, clear Apache Cordova tools cache, nothing helped.

0 Answers