nativescript-angular
nativescript-angular copied to clipboard
iOS device iPhone 6 fatal error after upgrade to Nativescript 7 and Angular 10
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?
Could you resolve this? Same here (but same error in simulator) with iOS14 and NativeScript 7.0.8.
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.
Did not have that line in nativescript.config.ts
:-(
@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.
I've created a new JS-Project and checked the dependency - with no success :-( Did not solve the error.
What help me was to add
main: 'main.js
to my nativescript.config.ts file because i didnt have one in mine
@matdenn thank you! Worked for me as well after migrating from 6.5.2 to 7.
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
This did not work for me, still have this issue on real iOS device.
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.
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
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.
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.
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.