ipfs / ipfs-desktop

An unobtrusive and user-friendly desktop application for IPFS on Windows, Mac and Linux.
https://docs.ipfs.tech/install/ipfs-desktop/
MIT License
6.01k stars 865 forks source link

Trouble building on macOS #517

Closed machawk1 closed 6 years ago

machawk1 commented 6 years ago

macOS 10.13.1 node v8.9.1 npm 5.5.1 station aa8b8630fc2e688693176c4ae06d5e3db13d9e77

Clone the repo, then cd'd into it, per the README.

npm install finished with some caveats
> macos-alias@0.2.11 install /Users/machawk1/Downloads/station/node_modules/macos-alias
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.2.0
gyp ERR! command "/usr/local/Cellar/node/8.9.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/machawk1/Downloads/station/node_modules/macos-alias
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 

> fs-xattr@0.1.17 install /Users/machawk1/Downloads/station/node_modules/fs-xattr
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.2.0
gyp ERR! command "/usr/local/Cellar/node/8.9.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/machawk1/Downloads/station/node_modules/fs-xattr
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: macos-alias@0.2.11 (node_modules/macos-alias):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: macos-alias@0.2.11 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-xattr@0.1.17 (node_modules/fs-xattr):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-xattr@0.1.17 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

added 49 packages in 16.37s
...however, npm start fails.
$ npm start

> ipfs-station@0.1.0 start /Users/machawk1/Downloads/station
> electron-forge start

✔ Checking your system
✔ Locating Application
✖ Preparing native dependencies: 0 / 1

An unhandled error has occurred inside Forge:
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/machawk1/Downloads/station/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.2.0
gyp ERR! command "/usr/local/Cellar/node/8.9.1/bin/node" "/Users/machawk1/Downloads/station/node_modules/.bin/node-gyp" "rebuild" "--target=1.7.9" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /Users/machawk1/Downloads/station/node_modules/secp256k1
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 

Failed with exit code: 1
Error: No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/machawk1/Downloads/station/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.2.0
gyp ERR! command "/usr/local/Cellar/node/8.9.1/bin/node" "/Users/machawk1/Downloads/station/node_modules/.bin/node-gyp" "rebuild" "--target=1.7.9" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /Users/machawk1/Downloads/station/node_modules/secp256k1
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 

Failed with exit code: 1
    at SafeSubscriber._error (/Users/machawk1/Downloads/station/node_modules/spawn-rx/lib/src/index.js:277:84)
    at SafeSubscriber.__tryOrUnsub (/Users/machawk1/Downloads/station/node_modules/rxjs/Subscriber.js:246:16)
    at SafeSubscriber.error (/Users/machawk1/Downloads/station/node_modules/rxjs/Subscriber.js:205:26)
    at Subscriber._error (/Users/machawk1/Downloads/station/node_modules/rxjs/Subscriber.js:135:26)
    at Subscriber.error (/Users/machawk1/Downloads/station/node_modules/rxjs/Subscriber.js:109:18)
    at MapSubscriber.Subscriber._error (/Users/machawk1/Downloads/station/node_modules/rxjs/Subscriber.js:135:26)
    at MapSubscriber.Subscriber.error (/Users/machawk1/Downloads/station/node_modules/rxjs/Subscriber.js:109:18)
    at SafeSubscriber._next (/Users/machawk1/Downloads/station/node_modules/spawn-rx/lib/src/index.js:251:65)
    at SafeSubscriber.__tryOrUnsub (/Users/machawk1/Downloads/station/node_modules/rxjs/Subscriber.js:246:16)
    at SafeSubscriber.next (/Users/machawk1/Downloads/station/node_modules/rxjs/Subscriber.js:193:22)
    at Subscriber._next (/Users/machawk1/Downloads/station/node_modules/rxjs/Subscriber.js:132:26)
    at Subscriber.next (/Users/machawk1/Downloads/station/node_modules/rxjs/Subscriber.js:96:18)
    at DefaultIfEmptySubscriber._next (/Users/machawk1/Downloads/station/node_modules/rxjs/operators/defaultIfEmpty.js:74:26)
    at DefaultIfEmptySubscriber.Subscriber.next (/Users/machawk1/Downloads/station/node_modules/rxjs/Subscriber.js:96:18)
    at TakeLastSubscriber._complete (/Users/machawk1/Downloads/station/node_modules/rxjs/operators/takeLast.js:109:29)
    at TakeLastSubscriber.Subscriber.complete (/Users/machawk1/Downloads/station/node_modules/rxjs/Subscriber.js:121:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ipfs-station@0.1.0 start: `electron-forge start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ipfs-station@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/machawk1/.npm/_logs/2017-12-04T17_53_54_521Z-debug.log
victorb commented 6 years ago

Seems you're missing xcode which is necessary for native modules to be built on OSX. Maybe you could try this:

xcode-select --install # Install Command Line Tools if you haven't already.
sudo xcode-select --switch /Library/Developer/CommandLineTools # Enable command line tools

From https://github.com/nodejs/node-gyp/issues/569

daviddias commented 6 years ago

Good to see you around @machawk1 :) Make sure to check out the new design branch too https://github.com/ipfs-shipyard/station/pull/516

machawk1 commented 6 years ago

@VictorBjelkholm That solved the issue and now I am able to install and run Station! Perhaps this information should be in the README.

@diasdavid That's actually what brought me back here! I saw @hacdias's demo video and wanted to give the project another spin.