Jalmar Tõnsau
Jalmar Tõnsau

Reputation: 126

Apache Cordova & npm

I am having problem with Visual studio and Apache Cordova. While trying to run "default" (Hello, your app is ready) app then I get following error. Cordova error I couldn't find any other solution for this so far. Things I'v tried: Running Visual Studio 2015 as Administrator (just to make sure that this wasn't it). Visual Studio "Repair" mode with installer. Googling both errors. Running app on device, ripple or emulator - all failed since build wasn't finished. The instructions that first error gives are bringing no results either, since it pretty much closes project and while opening and running it again, brings up same errors. Initially my plan is to create Hybrid app which is written in html, js and css. And has ability to read gps and accelerometer data. For helping me I added build log as well, replaced username and project name with {Username} & {Project name}.

1>------ Build started: Project: {Project name}, Configuration: Debug Android ------ 1> Your environment has been set up for using Node.js 5.5.0 (ia32) and npm. 1> ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\APACHECORDOVATOOLS\packages\vs-tac 1> ------ Name from source package.json: vs-tac 1> ------ Version from source package.json: 1.0.28 1> ------ Package not currently installed globally. 1> ------ Installing globally from source package. This could take a few minutes... 1> Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies. 1> npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"5.5.0","npm":"3.3.12"}) 1> npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm 1> npm WARN install:[email protected] ENOENT: no such file or directory, chmod 'C:\Users{Username}\AppData\Roaming\npm\node_modules\vs-tac\node_modules\cordova-lib\node_modules\npm\node_modules\rimraf\bin.js' 1> npm WARN install:[email protected] ENOENT: no such file or directory, chmod 'C:\Users{Username}\AppData\Roaming\npm\node_modules\vs-tac\node_modules\npm\node_modules\rimraf\bin.js' 1> > [email protected] install C:\Users{Username}\AppData\Roaming\npm\node_modules\vs-tac\node_modules\edge 1> > node tools/install.js 1> *************************************** 1> [Error: The edge module has not been pre-compiled for node.js version v5.5.0. You must build a custom version of edge.node. Please refer to https://github.com/tjanczuk/edge for building instructions.] 1> *************************************** 1> Success: platform check for edge.js: node.js ia32 v5.5.0 1> C:\Users{Username}\AppData\Roaming\npm 1> └── (empty) 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\npm\node_modules\read-installed with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\npm\node_modules\rimraf with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\npm\node_modules\read-package-json with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\npm\node_modules\sha with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\npm\node_modules\cmd-shim with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\cordova-lib\node_modules\npm\node_modules\cmd-shim with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\cordova-lib\node_modules\npm\node_modules\read-installed with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\cordova-lib\node_modules\npm\node_modules\read-package-json with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\cordova-lib\node_modules\npm\node_modules\rimraf with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\cordova-lib\node_modules\npm\node_modules\sha with new installed version 1> npm ERR! code 1 1> ------ npm install failed. Exit code: 1 1> ------ Package installation failed. Retrying... 1> npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"5.5.0","npm":"3.3.12"}) 1> npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm 1> npm WARN install:[email protected] ENOENT: no such file or directory, chmod 'C:\Users{Username}\AppData\Roaming\npm\node_modules\vs-tac\node_modules\cordova-lib\node_modules\npm\node_modules\rimraf\bin.js' 1> npm WARN install:[email protected] ENOENT: no such file or directory, chmod 'C:\Users{Username}\AppData\Roaming\npm\node_modules\vs-tac\node_modules\npm\node_modules\rimraf\bin.js' 1> > [email protected] install C:\Users{Username}\AppData\Roaming\npm\node_modules\vs-tac\node_modules\edge 1> > node tools/install.js 1> *************************************** 1> [Error: The edge module has not been pre-compiled for node.js version v5.5.0. You must build a custom version of edge.node. Please refer to https://github.com/tjanczuk/edge for building instructions.] 1> *************************************** 1> Success: platform check for edge.js: node.js ia32 v5.5.0 1> C:\Users{Username}\AppData\Roaming\npm 1> └── (empty) 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\npm\node_modules\cmd-shim with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\npm\node_modules\read-installed with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\npm\node_modules\read-package-json with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\npm\node_modules\rimraf with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\npm\node_modules\sha with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\cordova-lib\node_modules\npm\node_modules\cmd-shim with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\cordova-lib\node_modules\npm\node_modules\read-installed with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\cordova-lib\node_modules\npm\node_modules\read-package-json with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\cordova-lib\node_modules\npm\node_modules\rimraf with new installed version 1> npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\vs-tac\node_modules\cordova-lib\node_modules\npm\node_modules\sha with new installed version 1> npm ERR! code 1 1> ------ npm install failed. Exit code: 1 1> ------ Package installation failed. Retrying... 1>C:\Program Files\MSBuild\Microsoft\VisualStudio\v14.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(279,5): error : Error installing local npm package. 1> module.js:341 1>
throw err; 1> ^ 1> 1>MSBUILD : cordova-build error BLD401: Error : BLD00401 : Could not find module 'C:\Users{Username}\AppData\Roaming\npm\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:339:15) 1> at Function.Module._load (module.js:290:25) 1> at Function.Module.runMain (module.js:447:10) 1> at startup (node.js:139:18) 1> at node.js:999:3 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

Upvotes: 0

Views: 622

Answers (1)

Ricardo Pontual
Ricardo Pontual

Reputation: 3757

Close the Visual Studio and try to re-install de vs-tac executing this command:

npm install -g C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac

Change the command above if your ApacheCordovaTools is installed in a different folder.

Upvotes: 0

Related Questions