sample-Groceries, Failed to find module: 'platform'

234 Views Asked by At

While i am following the nativescript with angular tutorial, my command prompt says "Successfully deployed on device with identifier 'emulator-5554'" but the emulator thrown the error below.

Error calling module function

Error: com.tns.NativeScriptException: Failed to find
module: 'platform', relative to: app/tns_modules/
com.tns.Module.resolvePathHelper(Module.java:159)
com.tns.Module.resolvePath(Module.java:6O)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:514)
com.tns.Runtime.run(Runtime.java:509)
com.tns.NativeScriptApplication.on
Create(NativeScriptApplication.java:17)
android. a pp.1 nst rum e ntat ion. call AppationOnCreate(lnstrumentation.java:1024)
android. app. ActivityThread.handleBindApplication(ActivityThread.java:5361).

Please help.

Thank you.

1

There are 1 best solutions below

0
On

Delete platforms and node_modules folders and rebuild the application with the respective command for the platform you are using. e.g. tns run android