Fatal JavaScript exception when I try get tns-core-modules/application

ios
nativescriptcore

#1

Hi, everyone.
I created app from a template ns-vue , and I try get tns-core-modules/application when I call it my app is crash

import Vue from 'nativescript-vue';

import HelloWorld from './components/HelloWorld';


import './styles.scss';

//IF I DROP THIS PART APP WORKS GOOD
const application = require("tns-core-modules/application");
console.log(application.ios ? " YOU HAVE IOS " : " YOU HAVE ANDROID")
// END PART

new Vue({

  render: h => h(HelloWorld),


}).$start();

Package.json :
{
“name”: “apptest”,
“version”: “1.0.0”,
“description”: “A native application built with NativeScript-Vue”,
“author”: "test@test.ru",
“license”: “MIT”,
“scripts”: {
“build”: “webpack --env.tnsAction build”,
“build:android”: “npm run build – --env.android”,
“build:ios”: “npm run build – --env.ios”,
“debug”: “webpack --watch --env.tnsAction debug”,
“debug:android”: “npm run debug – --env.android”,
“debug:ios”: “npm run debug – --env.ios”,
“watch”: “webpack --watch --env.tnsAction run”,
“watch:android”: “npm run watch – --env.android”,
“watch:ios”: “npm run watch – --env.ios”,
“clean”: “rimraf dist”
},
“dependencies”: {
“nativescript-theme-core”: “^1.0.4”,
“nativescript-vue”: “^1.3.1”,
“tns-core-modules”: “~3.4.1”
},
“devDependencies”: {
“babel-core”: “^6.26.0”,
“babel-loader”: “^7.1.4”,
“babel-plugin-transform-object-rest-spread”: “^6.26.0”,
“babel-preset-env”: “^1.6.1”,
“copy-webpack-plugin”: “^4.5.1”,
“css-loader”: “^0.28.11”,
“extract-text-webpack-plugin”: “^3.0.2”,
“fs-extra”: “^5.0.0”,
“nativescript-vue-externals”: “^0.2.0”,
“nativescript-vue-loader”: “^0.1.5”,
“nativescript-vue-target”: “^0.1.0”,
“nativescript-vue-template-compiler”: “^1.3.1”,
“node-sass”: “^4.7.2”,
“ns-vue-loader”: “^0.1.2”,
“optimize-css-assets-webpack-plugin”: “^3.2.0”,
“rimraf”: “^2.6.2”,
“sass-loader”: “^6.0.7”,
“vue-template-compiler”: “^2.5.16”,
“webpack”: “^3.11.0”,
“webpack-synchronizable-shell-plugin”: “0.0.7”,
“winston-color”: “^1.0.0”
}
}

Stack error
CONSOLE LOG file:///app/app.js:154:12: ’ YOU HAVE IOS ’

Retrieving resting unlock: 0

CONSOLE LOG file:///app/app.js:6133:14: ‘NativeScript-Vue has “Vue.config.silent” set to true, to see output logs set it to false.’

***** Fatal JavaScript exception - application has been terminated. *****

Native stack trace:

1 0x10522773c NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool, bool)

2 0x10524d2e4 NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)

3 0x105b4f088 ffi_closure_SYSV_inner

4 0x105b501b4 .Ldo_closure

5 0x182428c3c <redacted>

6 0x1824281b8 <redacted>

7 0x182427f14 <redacted>

8 0x1824a584c <redacted>

9 0x18235ef38 _CFXNotificationPost

10 0x182dcfbbc <redacted>

11 0x18c0a22f0 <redacted>

12 0x18c06f5e0 <redacted>

13 0x18c69fb1c <redacted>

14 0x18c06edd0 <redacted>

15 0x18c06ec6c <redacted>

16 0x18c06dafc <redacted>

17 0x18cd0384c <redacted>

18 0x18c06d1ec <redacted>

19 0x18cae8ac8 <redacted>

20 0x18cc36bf8 _performActionsWithDelayForTransitionContext

21 0x18c06cc0c <redacted>

22 0x18c06c5a8 <redacted>

23 0x18c0695e0 <redacted>

24 0x18c069330 <redacted>

25 0x184c97470 <redacted>

26 0x184c9fd6c <redacted>

27 0x181d88a60 <redacted>

28 0x181d90170 <redacted>

29 0x184ccb878 <redacted>

30 0x184ccb51c <redacted>

31 0x184ccbab8 <redacted>

JavaScript stack trace:

1 createRootView@file:///app/app.js:13879:75

2 didFinishLaunchingWithOptions@file:///app/app.js:13786:38

3 @[native code]

4 onReceive@file:///app/app.js:13691:32

5 UIApplicationMain@[native code]

6 start@file:///app/tns_modules/tns-core-modules/application/application.js:258:26

7 mount@file:///app/app.js:11336:22

8 $start@file:///app/app.js:11330:14

9 @file:///app/app.js:161:10

10 webpack_require@file:///app/app.js:20:34

11 @file:///app/app.js:63:37

12 anonymous@file:///app/app.js:64:12

13 evaluate@[native code]

14 moduleEvaluation@[native code]

15 @[native code]

16 promiseReactionJob@[native code]

JavaScript error:

file:///app/app.js:13879:75: JS ERROR Error: A Frame must be used to navigate to a Page.

*** JavaScript call stack:

(

0 UIApplicationMain@[native code]

1 start@file:///app/tns_modules/tns-core-modules/application/application.js:258:26

2 mount@file:///app/app.js:11336:22

3 $start@file:///app/app.js:11330:14

4 @file:///app/app.js:161:10

5 webpack_require@file:///app/app.js:20:34

6 @file:///app/app.js:63:37

7 anonymous@file:///app/app.js:64:12

8 evaluate@[native code]

9 moduleEvaluation@:1:11

10 @:7:48

11 promiseReactionJob@:1:11