flutter error: Because "flutterApp" depends on sqlflite any which doesn't exist version solving failed - sql

I am following a tutorial to make a Note Keeper Application, so I did as he said and added these dependencies in pubspec.yaml:
dependencies:
flutter:
sdk: flutter
sqlflite: any
path_provider: any
intl: ^0.16.1
he used intl: ^0.15.7 , but I changed it because it didn't work.
the prblem is that it's just keep showing these messages and loading forever when I press "get packages"
[note_keeper] flutter pub get
Running "flutter pub get" in note_keeper...
Because note_keeper depends on sqlflite any which doesn't exist (could not find package sqlflite at https://pub.dartlang.org), version solving failed.
pub get failed (server unavailable) -- attempting retry 1
could you help me and tell what to do please? :( !

dependencies:
flutter:
sdk: flutter
sqflite: ^1.3.1+1 // check the spelling of sqflite you have used `sqlflite` instead
path_provider: any
intl: ^0.16.1

Related

Missing config.json stencil CLI

I'm trying to do some work for a client, but cannot get their bigcommerce site running locally. I have installed stencil CLI (v3.1.1) and downloaded the theme from the bigcommerce dashboard (all files). from the root of the theme i ran "stencil init", then "npm i" and "stencil start".
when i run stencil start, it throws an error saying there's no config.json file.
this is the error i get
How do i generate the config.json file?
The only config file I see is config.stencil.json.
I have also tried running "stencil pull" in hopes that it would pull the config, but it throws another error: "not ok -- Error: Could not fetch active theme details for channel 1: Request failed with status code 404"
Stencil-cli version:
3.1.1
Node version:
12
NPM version:
6.14.15
OS:
mac big sur
Stencil 3.1.1 has been deprecated for some time now. I believe the current version is 3.8. As of 4 months ago, anything below 3.5 will not run (https://developer.bigcommerce.com/changelog#publications/required-stencil-cli-version-set-to-3-5-0).
If you don't have a config.json file in your project, you will need to get the one from the client's store. Try downloading their theme again. It should come through.
Edit: It is possibly the case that you need a new API token. Try making a new one for your store. Make sure the following scopes are set:
Themes: Modify
Settings & Information: Modify
Sites & Routes: Read-only (or Modify)
Documentation for creating a new API account: https://support.bigcommerce.com/s/article/Store-API-Accounts#creating

Connection to flow server got closed. See the output for more information

I got this error message when using React Native on vscode. Is there a way to fix it?
[Error - 2:57:25 PM - MyRealmApp\.flowconfig] Error loading flow using option 'useNPMPackagedFlow'
Pkg flow-bin not found in c:\Users\ReactNativeProjects\MyRealmApp
[Error - 2:57:25 PM - MyRealmApp\.flowconfig] Error loading flow using option 'pathToFlow'
'flow' not found
[Info - 2:57:25 PM - MyRealmApp\.flowconfig] Falling back to bundled flow.
[Info - 2:57:27 PM - MyRealmApp\.flowconfig] Using flow 'c:\Users\.vscode\extensions\flowtype.flow-for-vscode-1.9.2\node_modules\flow-bin\flow-win64-v0.107.0\flow.exe' (v0.107.0)
.flowconfig:28 Unsupported option specified! (format.bracket_spacing)
[Error - 2:57:28 PM] Connection to server got closed. Server will not be restarted.
Basically this issue was caused by not having installed the same version of flow-bin as declared in the .flowconfig of the projects.
Now what you have to do to fix that, is to maintain coherence in the current .flowconfig of the project in your VS Code.
How to do that?
You can just do the below thing and it will fix your issue. If you don't have a yarn, then use npm in place of yarn.
yarn global add flow-bin#version
npm run ios or npm run android
The above will help you fix the issue, but you will always have to check whether they are getting pointed to the same version. In order to fix it stably, you can do the following:
In your VS Code settings you need to point flow.pathToFlow to your workspace node_module:
// settings.json
{
"flow.pathToFlow": "${workspaceFolder}/node_modules/.bin/flow",
}
${workspaceFolder} is a special variable provided by VS Code and it always points to the current project folder. You can find it in the variables reference page of the official docs.
You can prefer to use the local Flow module because this way you can ensure that the installed version and the configured one in .flowconfig always match even when you switch projects.
There is an extra setting for that: flow.useNPMPackagedFlow, just set it to true and you are done (no need to change flow.pathToFlow)

Adding multidex support to Flutter

I am building my app with Flutter. Now I am always getting this error:
FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug',> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: ...The number of method references in a .dex file cannot exceed 64K.Learn how to resolve this issue: https://developer.android.com/tools/building/multidex.html* Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.* Get more help at https://help.gradle.org BUILD FAILED in 32s Finished with error: Gradle build failed: 1
So this error clearly says that I must add multidex-support. But how to do this in FLUTTER?
The problem is not with Firebase or Firestore - Its the number of dependencies you have added to your application, you need to enable Multidex - there are some steps on how to do it online Flutter multidex problem With FirebaseAuth , Firestore and Google Sign in
Versions of the platform prior to Android 5.0 use the Dalvik runtime for executing app code. By default, Dalvik limits apps to a single classes.dex bytecode file per APK. In order to get around this limitation, you can add the multidex support library to your project:
dependencies {
def multidex_version = "2.0.1"
implementation 'androidx.multidex:multidex:$multidex_version'
}
To view the current versions for this library, see the information about Multidex on the versions page.
If you aren't using AndroidX, add the following support library dependency instead:
dependencies {implementation 'com.android.support:multidex:1.0.3'}
Finally, I fixed it with removing the CloudFirestore implementation. Seems there is a version bug at the time.

Lots of Flow errors in React Native project

I created a React Native project from Expo. Then I wanted to add Flow to it. I noticed in my node_modules/react-native folder there was a .flowconfig so I copied that to the root of my project. After running flow I got some warnings from files in node_modules/exponent so I added an ignore for that whole folder. Afterwards, I still get many errors when running flow. Here are a few:
node_modules/react-native/Libraries/Animated/src/AnimatedImplementation.js:227
227: /* $FlowFixMe */
^^^^^^^^^^^^^^^^ Error suppressing comment. Unused suppression
node_modules/react-native/Libraries/Animated/src/AnimatedImplementation.js:1120
1120: if (__DEV__) {
^^^^^^^ identifier `__DEV__`. Could not resolve name
node_modules/react-native/Libraries/Animated/src/AnimatedImplementation.js:2162
2162: if (__DEV__) {
^^^^^^^ identifier `__DEV__`. Could not resolve name
Expo SDK version: 14.0.0
Flow version: 0.37.0
React Native version: 0.41.2
You can suppress errors in .flowconfig file, in [options] section as follows:
[options]
suppress_type=$FlowFixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-8]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
Then, in [libs] section, you should point so called library definition file, like:
[libs]
./libdefs.js
And in libdefs.js just declare:
declare var __DEV__:string;
These changes should resolve your errors. See:
https://flow.org/en/docs/config/options/#toc-suppress-comment-regex and
https://flow.org/en/docs/libdefs/creation/ for details.
Looks like it might have been an oversight on the flow types for that release version.
All of those errors look fairly harmless though so you could just ignore it. If you absolutely cannot ignore it, update to a later version of React Native that's locked to a different version of Flow? I've had good results personally (no errors) with React Native # 0.42 and Flow # 0.38.
Found this issue which recommended updating the flowconfig to use the latest version from create-react-native-app. Seems to have worked for me.

selenium2 for composer install facing with phalcon/incubator error in PHP

I am using window command prompt,When I update composer facing with below error
C:\xampp\htdocs\myproject>composer update
Warning: This development build of composer is over 60 days old. It is recommend
ed to update it by running "C:\ProgramData\ComposerSetup\bin\composer.phar self-
update" to get the latest version.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Failed to decode response: zlib_decode(): data error
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubles
hooting.md#degraded-mode for more info
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for phalcon/incubator dev-master -> satisfiable by ph
alcon/incubator[dev-master].
- phalcon/incubator dev-master requires ext-phalcon >=2.0.4 -> the requested
PHP extension phalcon is missing from your system.
The last line should give you a clue: You haven't yet installed PhalconPHP on your system, which is required by the Incubator package.
Also, run a composer self-update as recommended.