Reputation: 2111
I have an NS 6.3.0 Core app on a windows 10 machine. When I try to build the cli gets stuck. Here are the details:
PS C:\DEV PROJECTS\DRAX\Project\wa_app> tns build android
Copying template files...
Platform android successfully added. v6.3.1
Preparing project...
Starting type checking service...
Using 1 worker with 4096MB memory limit
I have left it there for 90 minutes without any additional activity. Here is the output if I use --log trace:
Looking for project in 'C:\DEV PROJECTS\DRAX\Project\wa_app'
Project directory is 'C:\DEV PROJECTS\DRAX\Project\wa_app'.
Loading extensions.
System information:
{
"platform": "win32",
"shell": "C:\\WINDOWS\\system32\\cmd.exe",
"os": "Windows 10 Pro 6.3.18362",
"procArch": "x64",
"nodeVer": "12.6.0",
"npmVer": "6.9.0",
"nodeGypVer": null,
"nativeScriptCliVersion": "6.3.0",
"gitVer": "2.15.1.windows.2",
"dotNetVer": "4.8.03752",
"javacVersion": "1.8.0_172",
"javaVersion": "1.8.0_172",
"javaPath": "C:\\Program Files\\Java\\jdk1.8.0_172\\bin\\java.exe",
"adbVer": "1.0.41",
"androidInstalled": true,
"monoVer": null,
"gradleVer": null,
"isAndroidSdkConfiguredCorrectly": true,
"xcodeprojLocation": null,
"itunesInstalled": false,
"isCocoaPodsWorkingCorrectly": false,
"isCocoaPodsUpdateRequired": false,
"pythonInfo": null
}
Current CLI version: 6.3.0
Starting watch on killswitch C:\Users\Daniel\AppData\Local\Temp\Daniel\KillSwitches\cli
Trying to handle SIGINT event. CLI overrides this behavior and does not allow handling SIGINT as this causes issues with Ctrl + C in terminal.
The stackTrace of the location trying to handle SIGINT is:
at process.on (C:\Users\Daniel\AppData\Roaming\npm\node_modules\nativescript\lib\nativescript-cli.js:24:28)
at C:\Users\Daniel\AppData\Roaming\npm\node_modules\nativescript\node_modules\signal-exit\index.js:122:15
at Array.filter (<anonymous>)
at load (C:\Users\Daniel\AppData\Roaming\npm\node_modules\nativescript\node_modules\signal-exit\index.js:120:21)
at module.exports (C:\Users\Daniel\AppData\Roaming\npm\node_modules\nativescript\node_modules\signal-exit\index.js:35:5)
at Object.<anonymous> (C:\Users\Daniel\AppData\Roaming\npm\node_modules\nativescript\node_modules\proper-lockfile\lib\lockfile.js:296:1)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:683:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (C:\Users\Daniel\AppData\Roaming\npm\node_modules\nativescript\node_modules\proper-lockfile\index.js:3:18)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
spawn: C:\Program Files\nodejs\node.exe "C:\Users\Daniel\AppData\Roaming\npm\node_modules\nativescript\lib\detached-processes\cleanup-process.js" "C:\Users\Daniel\AppData\Roaming\npm\node_modules\nativescript\lib\bootstrap.js"
Shasum of file C:\DEV PROJECTS\DRAX\Project\wa_app\package.json is b3aed19d4e097a799102ec94894a2a7b24e4c758
Got cached result for shouldMigrate for platform: Android
Initializing analytics statuses.
Analytics statuses: { TrackFeatureUsage: 'disabled', TrackExceptions: 'disabled' }
getInfos cacheConfig options: { forceCheck: undefined } current info from cache: [
{
message: 'Your ANDROID_HOME environment variable is set and points to correct directory.',
platforms: [ 'Android' ],
type: 'info'
},
{
message: 'Your adb from the Android SDK is correctly installed.',
platforms: [ 'Android' ],
type: 'info'
},
{
message: 'The Android SDK is installed.',
platforms: [ 'Android' ],
type: 'info'
},
{
message: 'A compatible Android SDK for compilation is found.',
platforms: [ 'Android' ],
type: 'info'
},
{
message: 'Javac is installed and is configured properly.',
platforms: [ 'Android' ],
type: 'info'
},
{
message: 'The Java Development Kit (JDK) is installed and is configured properly.',
platforms: [ 'Android' ],
type: 'info'
},
{
message: 'Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.',
additionalInformation: '',
platforms: [ 'iOS' ],
type: 'info'
}
]
Your ANDROID_HOME environment variable is set and points to correct directory.
Your adb from the Android SDK is correctly installed.
The Android SDK is installed.
A compatible Android SDK for compilation is found.
Javac is installed and is configured properly.
The Java Development Kit (JDK) is installed and is configured properly.
Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
Selected targetSdk is: 28
Installed Android Targets are: [ 'android-25', 'android-26', 'android-28' ]
Selected buildToolsVersion is: 28.0.3
Validate options for platform: Android
Project dir from hooksArgs is: C:\DEV PROJECTS\DRAX\Project\wa_app.
Hooks directories: [ 'C:\\DEV PROJECTS\\DRAX\\Project\\wa_app\\hooks' ]
BeforeHookName for command prepare is before-prepare
Preparing project...
spawn: C:\Program Files\nodejs\node.exe "--max_old_space_size=4096" "--preserve-symlinks" "C:\DEV PROJECTS\DRAX\Project\wa_app\node_modules\webpack\bin\webpack.js" "--config=C:\DEV PROJECTS\DRAX\Project\wa_app\webpack.config.js" "--env.android" "--env.appPath=app" "--env.appResourcesPath=app\App_Resources" "--env.verbose" "--env.sourceMap"
clean-webpack-plugin: C:\DEV PROJECTS\DRAX\Project\wa_app\platforms\android\app\src\main\assets\app\**\* has been removed.
clean-webpack-plugin: C:\DEV PROJECTS\DRAX\Project\wa_app\platforms\android\app\src\main\assets\snapshots has been removed.
clean-webpack-plugin: C:\DEV PROJECTS\DRAX\Project\wa_app\platforms\android\app\build\configurations\nativescript-android-snapshot has been removed.
Starting type checking service...
Using 1 worker with 4096MB memory limit
The CLI also hangs on tns run command with:
C:\DEV PROJECTS\DRAX\Project\wa_app>tns run android
Searching for devices...
Preparing project...
File change detected. Starting incremental webpack compilation...
Starting type checking service...
Using 1 worker with 4096MB memory limit
webpack is watching the files…
I have tried removing nativescript, restarting my machine, restarting VS Code with no results. The same happens if I try to use SideKick.
Any ideas on how to get past this?
Thanks
Upvotes: 0
Views: 819
Reputation: 2111
After some testing, I narrowed it down to the https://www.npmjs.com/package/nativescript-contacts plugin. I do not know what the reason is, but as soon as I uninstalled it, everything worked as expected.
Upvotes: 0