【发布时间】:2020-06-06 22:03:38
【问题描述】:
我在 Windows 10 机器上有一个 NS 6.3.0 Core 应用程序。当我尝试构建 cli 时卡住了。以下是详细信息:
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
我已经将它放在那里 90 分钟,没有任何额外的活动。如果我使用 --log 跟踪,这是输出:
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
CLI 也挂在 tns run 命令上:
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…
我尝试删除 nativescript,重新启动我的机器,重新启动 VS Code,但没有任何结果。如果我尝试使用 SideKick,也会发生同样的情况。
关于如何克服这个问题的任何想法?
谢谢
【问题讨论】:
-
面临与 Nativescript 6.5.0 相同的问题,我没有插件 nativescript-contacts。
标签: nativescript nativescript-cli nativescript-sidekick