2

I have a cordova project. It was working well earlier. But today is not building.

Throws this error.

1>MSBUILD : cordova-build error BLD401: Error : BLD00401 : Could not find module '{project-path}\node_modules\vs-tac\app.js'. Please Go to Tools --> Options --> Tools for Apache Cordova --> Cordova Tools --> Clear Cordova Cache and try building again.
1>      at Function.Module._resolveFilename (module.js:336:15)
1>      at Function.Module._load (module.js:278:25)
1>      at Function.Module.runMain (module.js:501:10)
1>      at startup (node.js:129:16)
1>      at node.js:814:3

I googled about this and I found some solutions.

First

Found it here Cordova application build error

  1. Got to--> C:\Users[your user name]\AppData\Roaming\npm\node_modules
  2. Removed--> vs-tac folder
  3. open command prompt and run: npm install -g "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac"
  4. Cleaned solution with re-build

It's throwing following error while doing 3rd step

Error: The edge module has not been pre-compiled for node.js version v8.9.4. You
 must build a custom version of edge.node. Please refer to https://github.com/tj
anczuk/edge for building instructions.
    at determineVersion (C:\Users\mkumawat\AppData\Roaming\npm\node_modules\vs-t
ac\node_modules\edge\lib\edge.js:21:11)
    at Object.<anonymous> (C:\Users\mkumawat\AppData\Roaming\npm\node_modules\vs
-tac\node_modules\edge\lib\edge.js:30:78)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\mkumawat\AppData\Roaming\npm\node_modules\vs
-tac\node_modules\edge\tools\checkplatform.js:2:2)
***************************************
Success: platform check for edge.js: node.js x64 v8.9.4
added 88 packages in 26.44s

Finally move to another solution

Second

Copy this folder "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac" to 'C:\Users[your user name]\AppData\Roaming\npm\node_modules' and the run num install command.

While running command found same error Error: The edge module has not been pre-compiled for node.js version v8.9.4.................

I have

node v8.9.4

npm 5.6.0

Anyone know about this bug.

Any help would be appreciated.

Manoj
  • 4,951
  • 2
  • 30
  • 56

0 Answers0