ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

Live reload not working on my android device

Open GhoshWorld opened this issue 4 years ago • 0 comments

Description:

Show this error when I live reload on my android device.

[ng] An unhandled exception occurred: Must use import to load ES Module: F:\AvirupIonicApp\GitNeedAGuy\ionic-needaguy\node_modules\@angular\compiler-cli\bundles\index.js
[ng] require() of ES modules is not supported.
[ng] require() of F:\AvirupIonicApp\GitNeedAGuy\ionic-needaguy\node_modules\@angular\compiler-cli\bundles\index.js from F:\AvirupIonicApp\GitNeedAGuy\ionic-needaguy\node_modules\@ionic\angular-toolkit\node_modules\@angular-devkit\build-angular\src\webpack\configs\common.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
[ng] Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from F:\AvirupIonicApp\GitNeedAGuy\ionic-needaguy\node_modules\@angular\compiler-cli\package.json.
[ng]
[ng] See "C:\Users\AVIRUP\AppData\Local\Temp\ng-gSN7CJ\angular-errors.log" for further details.

[ERROR] ng has unexpectedly closed (exit code 127).

My ionic info:

Ionic:

   Ionic CLI                     : 5.4.16 (C:\Users\AVIRUP\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 6.0.1
   @angular-devkit/build-angular : 13.0.4
   @angular-devkit/schematics    : 13.0.4
   @angular/cli                  : 13.0.4
   @ionic/angular-toolkit        : 5.0.3

Cordova:

   Cordova CLI       : 11.0.0
   Cordova Platforms : android 10.1.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 11 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 1.5.0

System:

   NodeJS : v12.20.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.14.8
   OS     : Windows 7

GhoshWorld avatar Jan 14 '22 14:01 GhoshWorld