nativescript-angular icon indicating copy to clipboard operation
nativescript-angular copied to clipboard

iOS device iPhone 6 fatal error after upgrade to Nativescript 7 and Angular 10

Open vforv opened this issue 4 years ago • 14 comments

On iOS simulartor everything works fine. Everything works fine on android as well.

After I try to run on iPhone 6 I get error:

NativeScript encountered a fatal error: Uncaught Error: The specified module does not exist: .
at
require(:1:137)
*** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught Error: The specified module does not exist: .
at
require(:1:137)
', reason: '(null)'
*** First throw call stack:

What is issue?

vforv avatar Sep 23 '20 16:09 vforv

Could you resolve this? Same here (but same error in simulator) with iOS14 and NativeScript 7.0.8.

ghost avatar Sep 28 '20 16:09 ghost

I had exactly this error. It was caused by the file nativescript.config.ts (in the project root) which contained a line reading:

main: 'app.js',

I simply removed this line in order to fix it.

StarHack avatar Oct 01 '20 22:10 StarHack

Did not have that line in nativescript.config.ts :-(

ghost avatar Oct 05 '20 15:10 ghost

@spacetasse You might as well create a new folder and start a new NativeScript Angular project. Afterwards, check the dependency versions in the package.json of the newly created project against the ones you have in your upgraded project. Needless to say it's not recommended to manually adjust the package.json.

StarHack avatar Oct 05 '20 15:10 StarHack

I've created a new JS-Project and checked the dependency - with no success :-( Did not solve the error.

ghost avatar Oct 05 '20 15:10 ghost

What help me was to add main: 'main.js to my nativescript.config.ts file because i didnt have one in mine

matdenn avatar Nov 08 '20 19:11 matdenn

@matdenn thank you! Worked for me as well after migrating from 6.5.2 to 7.

adambeck7 avatar Nov 30 '20 23:11 adambeck7

Great, that worked for me too after upgrading 6.5.2 to 7

I'm pleased but a little surprised this was the solution since I a new separate v7 app using template template-drawer-navigation-ng and it did not include main in nativescript.config.ts

two-bridges avatar Dec 01 '20 23:12 two-bridges

This did not work for me, still have this issue on real iOS device.

AndreasKarlzzon avatar Jan 15 '21 15:01 AndreasKarlzzon

I am also having this problem sometimes. Most times it only occurs when working with simulators and real device at the same time. When I close all simulators and build the app again, it is working as expected on my real device.

felixkrautschuk avatar Jan 29 '21 13:01 felixkrautschuk

This occurs for me as well. Interstingly - one time I have to remove the line and the next time I have to add it to make it working... that's weird

swissdude avatar Apr 15 '21 09:04 swissdude

The bug appears intermittently even in NS 8.x. It's really annoying. The only thing that really helps is do a ns clean and recompile.

swissdude avatar May 28 '21 11:05 swissdude

Having the same error after upgrading from NS 7 to NS 8. Works fine on iOS simulator. But after building the .ipa file and install it on iOS device, app crashes at launch and I get this error.

Tried to add main: './src/main.ts' or main: 'main.ts in nativescript.config.ts but it didn't work.


Update: After I delete the mock service(including faker, mockjs.. packages) of my project, everything works fine.

ianshi95 avatar Jun 02 '21 03:06 ianshi95

For me, this problem occurred when I had axios in the project. Once I removed that, it worked okay. The hint that I had was the errors present during build or preview.

amunchet avatar Jun 12 '21 16:06 amunchet