Build problem for IOS


#1

Hello !

I try build via NativeScript Side Kick on MacOs.
Before checked components:

MacPro-Gabit:~ dev$ tns doctor

✔ Getting environment information 



No issues were detected.

✔ 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.

✔ Xcode is installed and is configured properly.

✔ xcodeproj is installed and is configured properly.

✔ CocoaPods are installed.

✔ CocoaPods update is not required.

✔ CocoaPods are configured properly.

✔ Your current CocoaPods version is newer than 1.0.0.

✔ Python installed and configured correctly.

✔ The Python 'six' package is found.

✔ Getting NativeScript components versions information...

✔ Component nativescript has 4.1.1 version and is up to date.

MacPro-Gabit:~ dev$ 

After, run build Local, and Cloud in Side kick.
Get reponse:

[18-06-20 12:37:29.225] Build started.
[18-06-20 12:37:36.425] (CLI) Executing before-prepare hook from /Users/dev/Documents/tophr01/hooks/before-prepare/nativescript-dev-sass.js
[18-06-20 12:37:36.428] (CLI) Found peer node-sass
[18-06-20 12:37:36.637] (CLI) /Users/dev/Documents/tophr01/node_modules/node-sass/lib/binding.js:15
[18-06-20 12:37:36.637] (CLI)       throw new Error(errors.missingBinary());
[18-06-20 12:37:36.637] (CLI)       ^
[18-06-20 12:37:36.637] (CLI) Error: Missing binding /Users/dev/Documents/tophr01/node_modules/node-sass/vendor/darwin-x64-57/binding.node
[18-06-20 12:37:36.637] (CLI) Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 8.x
[18-06-20 12:37:36.637] (CLI) Found bindings for the following environments:
[18-06-20 12:37:36.637] (CLI)   - Windows 64-bit with Node.js 9.x
[18-06-20 12:37:36.637] (CLI) This usually happens because your environment has changed since running `npm install`.
[18-06-20 12:37:36.637] (CLI) Run `npm rebuild node-sass --force` to build the binding for your current environment.
[18-06-20 12:37:36.637] (CLI)     at module.exports (/Users/dev/Documents/tophr01/node_modules/node-sass/lib/binding.js:15:13)
[18-06-20 12:37:36.637] (CLI)     at Object.<anonymous> (/Users/dev/Documents/tophr01/node_modules/node-sass/lib/index.js:14:35)
[18-06-20 12:37:36.637] (CLI)     at Module._compile (module.js:652:30)
[18-06-20 12:37:36.637] (CLI)     at Object.Module._extensions..js (module.js:663:10)
[18-06-20 12:37:36.637] (CLI)     at Module.load (module.js:565:32)
[18-06-20 12:37:36.637] (CLI)     at tryModuleLoad (module.js:505:12)
[18-06-20 12:37:36.637] (CLI)     at Function.Module._load (module.js:497:3)
[18-06-20 12:37:36.637] (CLI)     at Module.require (module.js:596:17)
[18-06-20 12:37:36.637] (CLI)     at require (internal/module.js:11:18)
[18-06-20 12:37:36.637] (CLI)     at Object.<anonymous> (/Users/dev/Documents/tophr01/node_modules/node-sass/bin/node-sass:10:10)
[18-06-20 12:37:36.641] Build failed. SASS compiler failed with exit code 1

Help me, please.


#2

did you try to run “tns build ios” from terminal ?


#3

Yes,

MacPro-Gabit:tophr01 dev$ tns build ios

Executing before-prepare hook from /Users/dev/Documents/tophr01/hooks/before-prepare/nativescript-dev-sass.js

Found peer node-sass

/Users/dev/Documents/tophr01/node_modules/node-sass/lib/binding.js:15

      throw new Error(errors.missingBinary());

      ^



Error: Missing binding /Users/dev/Documents/tophr01/node_modules/node-sass/vendor/darwin-x64-57/binding.node

Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 8.x



Found bindings for the following environments:

  - Windows 64-bit with Node.js 9.x



This usually happens because your environment has changed since running `npm install`.

Run `npm rebuild node-sass --force` to build the binding for your current environment.

    at module.exports (/Users/dev/Documents/tophr01/node_modules/node-sass/lib/binding.js:15:13)

    at Object.<anonymous> (/Users/dev/Documents/tophr01/node_modules/node-sass/lib/index.js:14:35)

    at Module._compile (module.js:652:30)

    at Object.Module._extensions..js (module.js:663:10)

    at Module.load (module.js:565:32)

    at tryModuleLoad (module.js:505:12)

    at Function.Module._load (module.js:497:3)

    at Module.require (module.js:596:17)

    at require (internal/module.js:11:18)

    at Object.<anonymous> (/Users/dev/Documents/tophr01/node_modules/node-sass/bin/node-sass:10:10)



SASS compiler failed with exit code 1

MacPro-Gabit:tophr01 dev$ 



#4

Please remove node_modules folder and run “npm install” at terminal


#5

After remove folder, run
npm install …
?


#6

Thank you very much, it is solved problem.