Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot read property 'match' of null' for nativescript #2437

Closed
moha974 opened this issue Jan 17, 2017 · 8 comments
Closed

cannot read property 'match' of null' for nativescript #2437

moha974 opened this issue Jan 17, 2017 · 8 comments

Comments

@moha974
Copy link

moha974 commented Jan 17, 2017

WARNING: Xcode is not installed or is not configured properly.
You will not be able to build your projects for iOS or run them in the iOS Simulator.
To be able to build for iOS and run apps in the native emulator, verify that you have installed Xcode.

Cannot read property 'match' of null

doctor

┌─────────┬──────────────┐
│ Usage │ Synopsis │
│ General │ $ tns doctor │
└─────────┴──────────────┘

Checks your system for configuration problems which might prevent the NativeScript CLI from working properly.

Sending exception report (press Ctrl+C to stop).....

@NickIliev
Copy link
Contributor

Hi @moha974

You probably need CocoaPods installed on your machine (if your OS is MAC OS).

sudo gem install cocoapod

@Dyareela
Copy link

Dyareela commented Jan 24, 2017

Hi!
Installing CocoaPods does not work for me. I´ve done everything like it is described on the nativeScript website for mac os. And of course, I´ve got Xcode intalled (version 8.2.1).
I´ve got Mac Os Sierra.
And
nb-syngeni371:~ ikr$ java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
nb-syngeni371:~ ikr$ npm -v
3.10.10
nb-syngeni371:~ ikr$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]

nb-syngeni371:~ ikr$ sudo gem install cocoapods
Password:
Successfully installed cocoapods-1.1.1
Parsing documentation for cocoapods-1.1.1
Done installing documentation for cocoapods after 4 seconds
1 gem installed
nb-syngeni371:~ ikr$ npm i -g nativescript
npm WARN deprecated node-uuid@1.4.3: use uuid module instead
npm WARN excluding symbolic link docs/stylesheets/hightlight.css -> ../../node_modules/highlight.js/src/styles/solarized_light.css
npm WARN excluding symbolic link docs/assets/ir_black.css -> ../../node_modules/highlight.js/src/styles/ir_black.css
npm WARN excluding symbolic link examples/TestFramework/Test Framework.framework/Resources -> Versions/Current/Resources
npm WARN excluding symbolic link examples/TestFramework/Test Framework.framework/Test Framework -> Versions/Current/Test Framework
npm WARN excluding symbolic link examples/TestFramework/Test Framework.framework/Versions/Current -> A
npm WARN deprecated lodash-node@2.4.1: This package is discontinued. Use lodash@^4.0.0.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated node-uuid@1.3.3: use uuid module instead

nativescript@2.4.2 preuninstall /usr/local/lib/node_modules/nativescript
node preuninstall.js

Failed to complete all pre-uninstall steps.
/usr/local/bin/tns -> /usr/local/lib/node_modules/nativescript/bin/nativescript.js
/usr/local/bin/nativescript -> /usr/local/lib/node_modules/nativescript/bin/nativescript.js

nativescript@2.4.2 postinstall /usr/local/lib/node_modules/nativescript
node postinstall.js

WARNING: Xcode is not installed or is not configured properly.
You will not be able to build your projects for iOS or run them in the iOS Simulator.
To be able to build for iOS and run apps in the native emulator, verify that you have installed Xcode.

Cannot read property 'match' of null
Error: Unknown command 'post-install-cli'. Try '$ tns help' for a full list of supported commands.
at Object. (/usr/local/lib/node_modules/nativescript/lib/common/errors.js:7: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. (/usr/local/lib/node_modules/nativescript/lib/nativescript-cli.js:9:16)
at Module._compile (module.js:570:32)
Sending exception report (press Ctrl+C to stop).../usr/local/lib
└── nativescript@2.4.2

@thowerton
Copy link

I have the same setup, and I am having the exact same issues.

@tkdaj
Copy link

tkdaj commented Jan 29, 2017

I also have the same setup and am having the same issues. I followed the steps described here: https://docs.nativescript.org/start/ns-setup-os-x and I get the same messages.

@thowerton
Copy link

I found a solution that worked for me. My issue was related to the Xcode command line installation.

#1064 (comment)

@Dyareela
Copy link

Dyareela commented Feb 4, 2017

@thowerton that worked for me!! you made my day, thanks!

@Plamen5kov
Copy link
Contributor

This issue is caused by a default variable, not being set. We took steps to show more verbose messages when running commands with --log trace. E.g. tns run ios --log trace. This should tell you if a default variable cannot be found in path. You can see more info in this PR

@angiefrancop
Copy link

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

sudo gem install cocoapods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants