安装Nativescript:Cocoapods出错

问题描述 投票:1回答:1

我正在尝试在我的Mac上安装Nativescript(运行OS Sierra)。我正如网站所说的那样做,我试图在任何地方搜索我能找到解决方案但没有运气。

我在开始时得到了一些不赞成的警告,但是当它到达Cocoapods时,一切都真的开始流失了。

这是终端上的内容(抱歉发布了整个内容,但也许还有其他错误,我没有注意到):

Theos-MacBook-Pro:/ theobalestra$ brew install xcproj
Warning: xcproj-0.2.1 already installed
Theos-MacBook-Pro:/ theobalestra$ npm i -g nativescript
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: This package is discontinued.                 Use lodash@^4.0.0.
npm WARN deprecated [email protected]: Use uuid module instead

> [email protected] preuninstall /Users/theobalestra/.npm-    packages/lib/node_modules/nativescript
> node preuninstall.js

Failed to complete all pre-uninstall steps.
/Users/theobalestra/.npm-packages/bin/nativescript ->     /Users/theobalestra/.npm-packages/lib/node_modules/nativescript/bin/tns
/Users/theobalestra/.npm-packages/bin/tns -> /Users/theobalestra/.npm-    packages/lib/node_modules/nativescript/bin/tns

> [email protected] postinstall /Users/theobalestra/.npm-    packages/lib/node_modules/nativescript
> node postinstall.js

WARNING: adb from the Android SDK is not installed or is not configured     properly.
For Android-related operations, the NativeScript CLI will use a built-in version of adb.
To avoid possible issues with the native Android emulator, Genymotion or connected
Android devices, verify that you have installed the latest Android SDK and
its dependencies as described in     http://developer.android.com/sdk/index.html#Requirements

TIP: To avoid setting up the necessary environment variables, you can use the Homebrew package manager to install the Android SDK and its dependencies.

Verifying CocoaPods. This may take more than a minute, please be patient.
  ◜ Installing iOS runtime.⸨░░░░░░░░░░░░░░░░░░⸩ ⠧ normalizeTree: sill install lo      
◠ Installing iOS runtime.⸨░░░░░░░░░░░░░░░░░░⸩ ⠙ normalizeTree: sill install lo  
◝ Installing iOS runtime.⸨░░░░░░░░░░░░░░░░░░⸩ ⠙ normalizeTree: sill install lo  
◞ Installing iOS runtime.⸨░░░░░░░░░░░░░░░░░░⸩ ⠙ normalizeTree: sill install lo  
◡ Installing iOS runtime.⸨░░░░░░░░░░░░░░░░░░⸩ ⠙ normalizeTree: sill install lo  
◟ Installing iOS runtime.⸨   ░░░░░░░░░░░░░░░⸩ ⠧ cloneCurrentTree: sill cloneCu  
◜ Installing iOS runtime.⸨    ░░░░░░░░░░░░░░⸩ ⠙ loadRequestedDeps: sill instal  
◠ Installing iOS runtime.⸨    ░░░░░░░░░░░░░░⸩ ⠙ loadRequestedDeps: sill instal      
◝ Installing iOS runtime.⸨    ░░░░░░░░░░░░░░⸩ ⠙ loadRequestedDeps: sill instal  
◞ Installing iOS runtime.⸨    ░░░░░░░░░░░░░░⸩ ⠙ loadRequestedDeps: sill instal  
◡ Installing iOS runtime.⸨    ░░░░░░░░░░░░░░⸩ ⠙ loadRequestedDeps: sill instal  
◟ Installing iOS runtime.⸨    ░░░░░░░░░░░░░░⸩ ⠙ loadRequestedDeps: sill instal  
◜ Installing iOS runtime.⸨    ░░░░░░░░░░░░░░⸩ ⠙ loadRequestedDeps: sill instal  
◠ Installing iOS runtime.⸨    ░░░░░░░░░░░░░░⸩ ⠙ loadRequestedDeps: sill instal  
◝ Installing iOS runtime.⸨    ░░░░░░░░░░░░░░⸩ ⠙ loadRequestedDeps: sill instal  
◞ Installing iOS runtime.⸨    ░░░░░░░░░░░░░░⸩ ⠙ loadRequestedDeps: sill instal  
◡ Installing iOS runtime.⸨    ░░░░░░░░░░░░░░⸩ ⠙ loadRequestedDeps: sill instal  
◟ Installing iOS runtime.⸨             ░░░░░⸩ ⠧ extract:tns-ios: sill doParall  
◜ Installing iOS runtime.⸨             ░░░░░⸩ ⠇ extract:tns-ios: sill doParall  
◠ Installing iOS runtime.⸨             ░░░░░⸩ ⠇ extract:tns-ios: sill doParall  
◝ Installing iOS runtime.⸨             ░░░░░⸩ ⠇ extract:tns-ios: sill doParall  
◞ Installing iOS runtime.⸨             ░░░░░⸩ ⠇ extract:tns-ios: sill doParall  
◡ Installing iOS runtime.⸨             ░░░░░⸩ ⠦ extract:tns-ios: sill doParall  
◟ Installing iOS runtime.⸨             ░░░░░⸩ ⠏ extract:tns-ios: sill doParall  
◜ Installing iOS runtime.⸨             ░░░░░⸩ ⠇ extract:tns-ios: sill doParall  
◠ Installing iOS runtime.⸨             ░░░░░⸩ ⠇ extract:tns-ios: sill doParall  
◝ Installing iOS runtime.⸨             ░░░░░⸩ ⠇ extract:tns-ios: sill doParall  
◞ Installing iOS runtime.⸨             ░░░░░⸩ ⠇ extract:tns-ios: sill doParall  
◡ Installing iOS runtime.⸨             ░░░░░⸩ ⠇ extract:tns-ios: sill doParall  
◟ Installing iOS runtime.⸨             ░░░░░⸩ ⠇ extract:tns-ios: sill doParall  
◜ Installing iOS runtime.⸨             ░░░░░⸩ ⠇ extract:tns-ios: sill doParall  
◠ Installing iOS runtime.⸨             ░░░░░⸩ ⠇ extract:tns-ios: sill doParall  
◝ Installing iOS runtime.⸨             ░░░░░⸩ ⠸ extract:tns-ios: sill [email protected] /private/var/folders/k5/jmd4lpjs4d9g2h9g_qw5qypm0000gn/T/nativescript-check-cocoapods117414-14624-9zer4y.acgt8uayvi
└── [email protected] 

npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

  ◠ Verifying CocoaPods. This may take some time, please be patient..
Path must be a string. Received undefined
Failed to display command help { Error
at Object.<anonymous> (/Users/theobalestra/.npm-    packages/lib/node_modules/nativescript/lib/common/errors.js:15:23)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/theobalestra/.npm-    packages/lib/node_modules/nativescript/lib/nativescript-cli.js:14:18)
    at Module._compile (module.js:570:32)
  name: 'Exception',
  message: 'Unknown command \'post-install-cli\'. Try \'$ tns help\'     for a full list of supported commands.',
  errorCode: 127,
  suppressCommandHelp: true }
/Users/theobalestra/.npm-packages/lib
└── [email protected] 
ios cocoapods nativescript
1个回答
0
投票

最近的更新已弃用部分nativescript docs macos设置步骤,特别是以下内容:

android update sdk --filter tools,platform-tools,android-25,build-tools-25.0.2,extra-android-m2repository,extra-google-m2repository,extra-android-support --all --no-ui

您可以使用sdkmanager --list来确定缺少哪些包。至少你应该:

build-tools;25.0.2
extras;android;m2repository
extras;google;m2repository
platform-tools
platforms;android-25
tools

如果缺少任何内容,请使用sdkmanager安装它们:

sdkmanager "extras;android;m2repository"
sdkmanager "extras;google;m2repository"
etc
© www.soinside.com 2019 - 2024. All rights reserved.