Build ios error code 65

So recently I got a Mac to be able to build an IOS application that i’ve been developing on a PC, I already build the android version so I just needed to
ionic cordova build ios on the Mac.
So I copied the project and run

ionic serve

just to test if everything was ok, and I got this message

Error: Missing binding /Users/usuario/Documents/SoySantos2/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 8.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/usuario/Documents/SoySantos2/node_modules/node-sass/lib/binding.js:15:13)
    at Object.<anonymous> (/Users/usuario/Documents/SoySantos2/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/usuario/Documents/SoySantos2/node_modules/@ionic/app-scripts/dist/core/bundle-components.js:6:16)

So I go to run npm rebuild node-sass --force and everything works fine and dandy, run ionic serve again to check. All going nice.

What I came her for, to build the IOS app, so I run ionic cordova build ios
and I got this error

ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


The following build commands failed:
	Ld /Users/usuario/documents/soysantos2/platforms/ios/build/emulator/ normal x86_64
(1 failure)
(node:2879) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error code 65 for command: xcodebuild with args: -xcconfig,/Users/usuario/documents/soysantos2/platforms/ios/cordova/build-debug.xcconfig,-workspace,SoySantos.xcworkspace,-scheme,SoySantos,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/usuario/documents/soysantos2/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/usuario/documents/soysantos2/platforms/ios/build/sharedpch
(node:2879) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I’ve search this forum, Stackoverflow, ionic github, cordova github and node github for a way to repair this error, but nothing seams to work.

This is my system info

cli packages: (/Users/usuario/Documents/SoySantos2/node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0 

local packages:

    @ionic/app-scripts : 2.1.4
    Cordova Platforms  : android 6.3.0 browser 5.0.1 ios 4.5.3
    Ionic Framework    : ionic-angular 3.6.1


    Node  : v8.9.4
    npm   : 5.6.0 
    OS    : macOS High Sierra
    Xcode : Xcode 9.2 Build version 9C40b 

Environment Variables:

    ANDROID_HOME : not set


    backend : pro

If anyone have any ideas of how to solve this, it would be greatly appreciated

Hi, I’ve the same issue.
Did you solve it?

Sadly no. No one has been able to help me

:frowning: So bad!! I’ll keep searching and if a know something I’ll post here.


I resolved the problem.

Try with this.

1 Like

I just tried that and got this error when running npm i

npm ERR! path /Users/admin/Documents/vortex/SoySantos2/node_modules/webpack/node_modules/node-libs-browser/package.json.1220806096
npm ERR! code ELOOP
npm ERR! errno -62
npm ERR! syscall open
npm ERR! ELOOP: too many symbolic links encountered, open '/Users/admin/Documents/vortex/SoySantos2/node_modules/webpack/node_modules/node-libs-browser/package.json.1220806096'

Did you run into this too?

Before try with this

npm cache clean

and after

npm i

Worked for me! Thanks :slight_smile: