Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

Cannot serve newly created app #832

Open
damon-hall opened this issue Aug 4, 2020 · 2 comments
Open

Cannot serve newly created app #832

damon-hall opened this issue Aug 4, 2020 · 2 comments

Comments

@damon-hall
Copy link

PhoneGap CLI, node & npm versions

phonegap: 9.0.0
node: 12.18.0
npm: 6.14.4

Expected Behaviour

Should be able to serve a newly created phonegap app

Actual Behaviour

Fails to serve newly created phonegap app with errors (below)

Steps to Reproduce

  1. npm i -g phonegap@latest (assuming 9.0.0 is still the latest version)
  2. phonegap create myApp
  3. cd ./myApp
  4. phonegap serve
  5. And connect using phonegap developer app

Sample Code that illustrates the problem

N/A - Default code from create (unchanged)

Error messages

Failed to install 'cordova-plugin-device': Error: Cannot find module 'glob'
Require stack:
- D:\Personal\myApp\node_modules\cordova-common\src\ConfigChanges\ConfigFile.js
- D:\Personal\myApp\node_modules\cordova-common\src\ConfigChanges\ConfigKeeper.js
- D:\Personal\myApp\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js
- D:\Personal\myApp\node_modules\cordova-common\cordova-common.js
- D:\Personal\myApp\node_modules\cordova-browser\bin\template\cordova\Api.js
- C:\Users\daveh\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova-lib\src\cordova\util.js
- C:\Users\daveh\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova-lib\src\platforms\platforms.js
- C:\Users\daveh\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova-lib\src\plugman\install.js
- C:\Users\daveh\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova-lib\src\plugman\plugman.js
- C:\Users\daveh\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova-lib\cordova-lib.js
- C:\Users\daveh\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova\src\help.js
- C:\Users\daveh\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova\src\cli.js
- C:\Users\daveh\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova\bin\cordova
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
    at Function.Module._load (internal/modules/cjs/loader.js:842:27)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at Object.get (D:\Personal\myApp\node_modules\cordova-common\src\util\addProperty.js:26:44)
    at resolveConfigFilePath (D:\Personal\myApp\node_modules\cordova-common\src\ConfigChanges\ConfigFile.js:224:31)
    at ConfigFile_load [as load] (D:\Personal\myApp\node_modules\cordova-common\src\ConfigChanges\ConfigFile.js:60:36)
    at new ConfigFile (D:\Personal\myApp\node_modules\cordova-common\src\ConfigChanges\ConfigFile.js:51:10)
    at ConfigKeeper_get [as get] (D:\Personal\myApp\node_modules\cordova-common\src\ConfigChanges\ConfigKeeper.js:51:23)
    at PlatformMunger_apply_file_munge [as apply_file_munge] (D:\Personal\myApp\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:78:50)
    at munge_helper (D:\Personal\myApp\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:238:14)
Installing "cordova-plugin-vibration" for browser

(node:6468) UnhandledPromiseRejectionWarning: Error [ERR_UNHANDLED_ERROR]: Unhandled error. ('The platform "browser" does not appear to be a valid cordova platform. It is missing API.js. browser not supported.')
    at CordovaEventEmitter.emit (events.js:304:17)
    at CordovaEventEmitter.emit (C:\Users\daveh\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova-common\src\events.js:69:22)
    at Object.getPlatformApiFunction (C:\Users\daveh\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova-lib\src\cordova\util.js:384:20)
    at Object.getPlatformApi (C:\Users\daveh\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova-lib\src\platforms\platforms.js:55:32)
    at C:\Users\daveh\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova-lib\src\cordova\prepare.js:52:38
    at Array.map (<anonymous>)
    at C:\Users\daveh\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova-lib\src\cordova\prepare.js:50:47
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:6468) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:6468) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@chrisgriffith
Copy link

The PhoneGap Developer app is no longer maintained, so to test your Cordova application on the device you will need to create the IPA or APK and install it directly.

@shrekuu
Copy link

shrekuu commented Apr 8, 2022

RIP.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants