Minimum version required of Amplify CLI is not installed in Xcode - ios

warning: AmplifyTools has been deprecated.
More info: https://github.com/aws-amplify/amplify-ios/blob/main/AmplifyTools/README.md
error: Minimum version required of Amplify CLI is not installed.
Min required version: (4.22.0)
Found Version: ([0m5.1.0[0m)
To install the latest version, please run the following command:
npm install -g #aws-amplify/cli#latest
As we can see found version is latest, but it is not taking.
when I checked in terminal amplify version:

Related

Is it possible(if yes, what is the best way) to build electron app having node-hid as a dependency on linux using docker for windows 32bit?

Using docker image electronuserland/builder:wine trying to build:
./node_modules/.bin/electron-builder --win --ia32
outputs:
• loaded configuration file=/project/electron-builder.yml
• writing effective config file=build/builder-effective-config.yaml
• rebuilding native dependencies dependencies=node-hid#2.1.1, sqlite3#4.2.0, usb-detection#4.10.0 platform=win32 arch=ia32
• install prebuilt binary name=usb-detection version=4.10.0 platform=win32 arch=ia32
• install prebuilt binary name=node-hid version=2.1.1 platform=win32 arch=ia32
⨯ cannot build native dependency reason=prebuild-install failed with error and build from sources not possible because platform or arch not compatible
cause=exit status 1
errorOut=prebuild-install info begin Prebuild-install version 5.3.6
prebuild-install WARN install prebuilt binaries enforced with --force!
prebuild-install WARN install prebuilt binaries may be out of date!
prebuild-install info looking for cached prebuild # /root/.npm/_prebuilds/c5dfd1-node-hid-v2.1.1-electron-v76-win32-ia32.tar.gz
prebuild-install http request GET https://github.com/node-hid/node-hid/releases/download/v2.1.1/node-hid-v2.1.1-electron-v76-win32-ia32.tar.gz
prebuild-install http 404 https://github.com/node-hid/node-hid/releases/download/v2.1.1/node-hid-v2.1.1-electron-v76-win32-ia32.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=8.1.1 runtime=electron arch=ia32 libc= platform=win32)
command=/usr/local/bin/node /project/node_modules/prebuild-install/bin.js --platform=win32 --arch=ia32 --target=8.1.1 --runtime=electron --verbose --force
workingDir=/project/node_modules/node-hid
What am I missing? Or is it actually required in this case to build app on windows machine?

React-Native Bundle Error error SHA-1 for file is not computed

I am facing this error while creating bundle of react-native app.
I am executing command react-native bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --platform ios
error SHA-1 for file /usr/local/lib/node_modules/react-native/node_modules/metro/src/lib/polyfills/require.js (/usr/local/lib/node_modules/react-native/node_modules/metro/src/lib/polyfills/require.js) is not computed. Run CLI with --verbose flag for more details.
ReferenceError: SHA-1 for file /usr/local/lib/node_modules/react-native/node_modules/metro/src/lib/polyfills/require.js (/usr/local/lib/node_modules/react-native/node_modules/metro/src/lib/polyfills/require.js) is not computed
at DependencyGraph.getSha1 (/usr/local/lib/node_modules/react-native/node_modules/metro/src/node-haste/DependencyGraph.js:258:13)
at /usr/local/lib/node_modules/react-native/node_modules/metro/src/DeltaBundler/Transformer.js:211:26
at Generator.next (<anonymous>)
at asyncGeneratorStep (/usr/local/lib/node_modules/react-native/node_modules/metro/src/DeltaBundler/Transformer.js:46:24)
at _next (/usr/local/lib/node_modules/react-native/node_modules/metro/src/DeltaBundler/Transformer.js:66:9)
at /usr/local/lib/node_modules/react-native/node_modules/metro/src/DeltaBundler/Transformer.js:71:7
at new Promise (<anonymous>)
at /usr/local/lib/node_modules/react-native/node_modules/metro/src/DeltaBundler/Transformer.js:63:12
at Transformer.transformFile (/usr/local/lib/node_modules/react-native/node_modules/metro/src/DeltaBundler/Transformer.js:236:7)
at /usr/local/lib/node_modules/react-native/node_modules/metro/src/Bundler.js:87:34
react-native info command output
info Fetching system and libraries information...
System:
OS: macOS Mojave 10.14.3
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU # 2.30GHz
Memory: 1.73 GB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.0 - /usr/local/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 23, 25, 26, 27, 28, 29
Build Tools: 27.0.3, 28.0.3
System Images: android-29 | Google Play Intel x86 Atom
Android NDK: 20.1.5948944
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1
react-native: 0.61.5
To solve my issue I have run command with --force option.
npm install -i -g --force react-native-cli
This issue was raise due to configure old project with old react-native version. and then trying to run latest react-native ver with new Project.
install with npx
run
on windows 10
npx react-native run-android
on linux
npx react-native start
I resolved the issue in my Mac using
npx react-native start
For me, I installed the wrong package.
Instead of this:
npm i -g react-native
Make sure you do this:
npm i -g react-native-cli
I can't comment so use npm install -i -g --force react-native-cli as stated by Punita. It works when it comes to fixing the SHA-1 issue.
But please don't use sudo for any npm related things. thanks.
I think that's about version of react-native-cli.
You should try to update.
npm i -g react-native-cli
To solve my issue I have run command with --force option.
npm install -i -g --force react-native-cli
I would like to add that this same error happened to me (running on PC, Windows) when I tried to run the gradle command to build an Android release (./gradlew bundleRelease).
I found the cause of the issue was due to using Dropbox to sync the folder that this React Native project belonged to, using the Dropbox "Back up your PC automatically" feature, where I had my user Documents folder backed up by Dropbox. Essentially, I would get an error like this:
error SHA-1 for file C:\Users\Ted
Zhu\Documents\my-app\MyAppWin\index.js (C:\Users\Ted
Zhu\Dropbox\PC\Documents\my-app\MyAppWin\index.js)
is not computed. Run CLI with --verbose flag for more details.
ReferenceError: SHA-1 for file C:\Users\Ted
Zhu\Documents\my-app\MyAppWin\index.js (C:\Users\Ted
Zhu\Dropbox\PC\Documents\my-app\MyAppWin\index.js)
is not computed
I would notice in the error message, it referred to the same file (index.js) with two different paths:
C:\Users\Ted Zhu\Documents\my-app\MyAppWin\index.js
C:\Users\Ted
Zhu\Dropbox\PC\Documents\my-app\MyAppWin\index.js
This must've been because Dropbox created a symbolic link of the folder so that it would have a path within my Dropbox folder. This appears to cause the file in question to have two paths that refer to the same folder, and trick the Metro bundler into thinking that a SHA hash was not created for one of the project files.
The solution was to move this project to a different directory that is not backed up by Dropbox. In my case, I just created a new folder in my user home directory. Then I was able to successfully run the gradle command to build the Android app.
For me, I fixed it by install correct react-native-cli:
yarn global remove react-native-cli
yarn global add react-native-cli
For me, global cli update does not work.
I Just run the command like yarn react-native bundle...It works!
yarn react-native bundle --reset-cache --entry-file index.js --platform ios --bundle-output test.bundle --dev false
This worked for me:
npx react-native start
When Metro has started, open another Tab on the terminal, same directory then run:
npx react-native bundle ...
The problem for me was not using npx for the react-native command.
To solve I have run
npm install -i -g --force react-native-cli

getting Error in starting hyperledger business network

I had followed all the steps of configuring the hyperledger business network using this link.
I had configured all the steps but i am stuck at the very last step of starting my business network.I am getting this error
Error: Error trying to start business network. Error: No valid
responses from any peers.
Response from attempted peer comms was an error: Error: failed to
execute transaction
6581ef4cc7b6fec6c0b69af693acb62d2690588288e5174d38fa86fcf90fef94:
error starting container: error starting container: Failed to
generate platform-specific docker build: Error returned from build:
1 "npm WARN notice [SECURITY] js-yaml has the following
vulnerabilities: 1 high, 1 moderate. Go here for more details:
https://www.npmjs.com/advisories?search=js-yaml&version=3.10.0-Run
`npm i npm#latest -g` to upgrade your npm version, and then `npm
audit` to get more info.
Please help me to solve this out.
My Enviorment:-
docker:- 18.09.7
docker-compose:-1.21.2
Node:-8.10.0
Npm:-6.9.2
Hyperdledger Fabric:-1.2
Composer:-0.20
Please help me to figure out this issue.
The following are prerequisites for installing the required development tools:
Operating Systems: Ubuntu Linux 14.04 / 16.04 LTS (both 64-bit), or Mac OS 10.12
Docker Engine: Version 17.03 or higher
Docker-Compose: Version 1.8 or higher
Node: 8.9 or higher (note version 9 and higher is not supported)
npm: v5.x
git: 2.9.x or higher
Python: 2.7.x
If you're running on Ubuntu, you can download the prerequisites using the following commands:
curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh

Installing plugins keeps failing because of es6-prepare-plugin

I am trying to prepare my iOS app and I need to get socialsharing and the whitelist plugin working, but they do not work. For example, when I do this:
sudo cordova plugin add cordova-plugin-x-socialsharing
I get this:
Installing "cordova-plugin-x-socialsharing" for android
Failed to install 'cordova-plugin-x-socialsharing':
CordovaError:
Failed to fetch plugin es6-promise-plugin via registry. Probably this
is either a connection problem, or plugin spec is incorrect. Check
your connection and plugin name/version/URL. Error: npm: Command
failed with exit code 1 Error output: npm ERR! code ENOLOCAL npm ERR!
Could not install from "node_modules/es6-promise-plugin" as it does
not contain a package.json file.
npm ERR!
How can I fix this? I tried everything. From sudo to non-sudo commands, but nothing is working for me. Adding es6-prepare-plugin manually does not work either.
My system information:
Cordova CLI: 7.0.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 1.3.3
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.8.1
Xcode version: Xcode 8.3.3 Build version 8E3004b
PS: in my package.json file, I see this:
"es6-promise-plugin": "file:node_modules/es6-promise-plugin",
How can I change this?
Oh dear Lord. I found the answer I was looking for, after I've struggled for hours. This link on Github is the answer to this problem.
Seems like npm version 5.x.x does not work with some ionic-plugins. I downgraded to npm 4 using npm install -g npm#4.6.1 and installing this plugin worked for me afterwards.
Ionic is so buggy sometimes. Very annoying.

IONIC:Unable to install phonegap-plugin-push in ios app

I am new with ionic framework.Currently i am working on ionic iOS app. when i install phonegap-plugin-push i am getting error
Failed to install 'phonegap-plugin-push':undefined Error: /Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:439:in `help!': [!] You cannot run CocoaPods as root. (CLAide::Help)
i have searched it but no solution found yet!
I also got same kind of problem. In my case I used sudo ionic platform add ios
This is worked well while building every plugins but phonegap-plugin-push.
phonegap-plugin-push is keep giving above error [!] You cannot run CocoaPods as root. (CLAide::Help)
Then I used ionic platform add ios without sudo This is the actual solution for this. But in this case It is keep giving me the permission related issue code EACCESS.
Then I used followings step to overcome that one.
sudo chown -R $USER /usr/local/
Again added cordoava and ionic
sudo npm install -g cordova
sudo npm install -g ionic
Other informations
phonegap-plugin-push version: 1.10.0
Cordova CLI: 6.5.0
Ionic CLI Version: 2.2.2
Node Version: v7.7.2
Xocde Version: Xcode 8.2.1
CocoaPods Version: 1.2.0
Hope this will help.

Resources