Cordova fails to install for a mobile project

Hi, thought you would like to know, I tried an experiment to create a framework 7 mobile app.
I created the project, choosing the framework 7 blank.
It immediately prompted to do a system check, where it pulled in some files, except the cordova file failed to install. I am on a windows 10 laptop with plenty of juice, let me know if which details you need to debug this.

Could you expand the bottom panel to see what errors do you get exactly?

Hi George

The cordova errors are… (last lines from the log file).

11768 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-cmd-shim\index.js:51:29
11768 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:123:16
11768 verbose stack at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
11769 verbose cwd C:\Users\x\AppData\Local\Wappler\package.nw
11770 verbose Windows_NT 10.0.190410
11771 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “-g” “install” “cordova”
11772 verbose node v14.16.0
11773 verbose npm v6.14.11
11774 error code EEXIST
11775 error path C:\Users\x\AppData\Roaming\npm\node_modules\cordova\bin\cordova
11776 error dest C:\Users\x\AppData\Roaming\npm\cordova.cmd
11777 error EEXIST: file already exists, cmd shim ‘C:\Users\x\AppData\Roaming\npm\node_modules\cordova\bin\cordova’ -> ‘C:\Users\x\AppData\Roaming\npm\cordova.cmd’
11778 error File exists: C:\Users\x\AppData\Roaming\npm\cordova.cmd
11779 error Remove the existing file and try again, or run npm
11780 error with --force to overwrite files recklessly.
11781 verbose exit [ 1, true ]

Seems Wappler doesn’t have enough permissions to install Cordova for you, so you can do it manually by opening a terminal and enter:

npm install -g cordova

As explained in:

https://cordova.apache.org/#getstarted

Hi George

It actually ran into the same errors

I would have cleared the folder out and tried again but there is a line that there is a library no longer supported.

Maybe this will help:

Hi George

Following one of the ideas in that thread, i deleted the npm folder and ran the command again, it worked. Back in wappler, I ran a system check again - seems all is well.

Thank you, onwards and upwards.

1 Like