-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Error of Electron not supported on IOS when installing IPFS on MacOS #2774
Comments
The error happened when launch the app with |
Electron is indeed not available for iOS so this error makes sense. What makes less sense is why it's trying to install electron in the first place. It could be related to ipfs/aegir#516 but it's hard to know for sure. Similar to my request on one of your other issues can you please share a runnable example? By this I mean please create a simple github repo that I can clone, run |
I take it you're using npm to install your project dependencies? If so, could you try removing your |
I use yarn and tried npm as well. I repeated creation process a few times. The error here is after
The execution of this line stuck. The issue should be related to module nodejs-mobile-react-native as well. But I don't know which module may have more into it. |
|
Ok, can you please create and share a github repo with a small demo project in it that shows the problem along with instructions on how to replicate? I'm not a react native expert so it would be really helpful. If you like, you could PR a react-native example to https://github.com/ipfs/js-ipfs/tree/master/examples that just starts an IPFS node and shows the peer ID and agent version similar to the browser-create-react-app one? |
Hi, I uploaded my test code to https://github.com/emclab/test_ipfs_nodejs_mobile_react_native. somehow I could not PR to the js-ipfs. After clone the project on MacOS catalina, with Xcode 11.3 installed (Here is the RN get started). do the following:
There will be build error. Please be noted that |
React Native is not (yet) a supported platform for running js-IPFS - we're working on adding support over at #2813 Once that issue is resolved we'll be in a better position to debug and fix problems with IPFS running on RN, so if this problem still occurs after that is complete please re-open this issue. |
npm info lifecycle [email protected]
preinstall: [email protected]install: [email protected]npm info linkStuff [email protected]
npm info lifecycle [email protected]
npm info lifecycle [email protected]
postinstall: [email protected]preinstall: [email protected]npm verb rebuild bundle /Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/ee-first
npm info build /Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/ee-first
npm info lifecycle [email protected]
npm info linkStuff [email protected]
npm info lifecycle [email protected]
install: [email protected]postinstall: [email protected]npm info lifecycle [email protected]
npm verb rebuild bundle /Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/ejs
npm info build /Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/ejs
npm info lifecycle [email protected]
preinstall: [email protected]install: [email protected]npm info linkStuff [email protected]
npm info lifecycle [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
npm verb lifecycle [email protected]
postinstall: unsafe-perm in lifecycle truepostinstall: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/ejs/node_modules/.bin:/Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/.bin:/Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/.bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/local/bin:/Users/zhouyiyun/Documents/js/ipat_test1/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbinnpm verb lifecycle [email protected]
npm verb lifecycle [email protected]
postinstall: CWD: /Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/ejspreinstall: [email protected]npm verb rebuild bundle /Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/electron
npm info build /Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/electron
npm info lifecycle [email protected]
npm info linkStuff [email protected]
npm verb linkBins [
npm verb linkBins { electron: 'cli.js' },
npm verb linkBins '/Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/.bin',
npm verb linkBins false
npm verb linkBins ]
npm verb rebuildBundles [ '@types' ]
npm info lifecycle [email protected]
install: [email protected]postinstall: [email protected]npm info lifecycle [email protected]
/Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/electron/install.js:68
throw new Error('Electron builds are not available on platform: ' + platform)
^
Error: Electron builds are not available on platform: ios
at getPlatformPath (/Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/electron/install.js:68:13)
at Object. (/Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/electron/install.js:22:20)
at Module._compile (internal/modules/cjs/loader.js:1157:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
at Module.load (internal/modules/cjs/loader.js:1001:32)
at Function.Module._load (internal/modules/cjs/loader.js:900:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
npm verb lifecycle [email protected]
postinstall: unsafe-perm in lifecycle truepostinstall: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/electron/node_modules/.bin:/Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/.bin:/Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/.bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/local/bin:/Users/zhouyiyun/Documents/js/ipat_test1/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbinnpm verb lifecycle [email protected]
npm verb lifecycle [email protected]
postinstall: CWD: /Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project/node_modules/ipfs/node_modules/electronpostinstall: Failed to exec postinstall scriptnpm info lifecycle [email protected]
npm verb stack Error: [email protected] postinstall:
node install.js
npm verb stack Exit status 1
npm verb stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
npm verb stack at EventEmitter.emit (events.js:321:20)
npm verb stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
npm verb stack at ChildProcess.emit (events.js:321:20)
npm verb stack at maybeClose (internal/child_process.js:1021:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
npm verb pkgid [email protected]
npm verb cwd /Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Products/Debug-iphonesimulator/ipat_test1.app/nodejs-project
npm verb Darwin 19.0.0
npm verb argv "/usr/local/bin/node" "/usr/local/bin/npm" "--verbose" "rebuild" "--build-from-source"
npm verb node v12.16.0
npm verb npm v6.13.4
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall:
node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 1, true ]
npm timing npm Completed in 10511ms
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/zhouyiyun/.npm/_logs/2020-02-12T20_42_39_670Z-debug.log
Command PhaseScriptExecution failed with a nonzero exit code
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution [CP-User]\ [NODEJS\ MOBILE]\ Build\ Native\ Modules /Users/zhouyiyun/Documents/js/ipat_test1/ios/build/ipat_test1/Build/Intermediates.noindex/ipat_test1.build/Debug-iphonesimulator/ipat_test1.build/Script-821AE48DBADAD4819E69BEC8.sh
Severity:
Description:
Steps to reproduce the error:
The text was updated successfully, but these errors were encountered: