Popular New Releases in Testing
jest
v28.0.0-alpha.11
cypress
9.5.4
react-testing-library
v13.1.1
testcafe
v1.18.6
metersphere
v1.20.0-rc2
Popular Libraries in Testing
by facebook typescript
38648 MIT
Delightful JavaScript Testing.
by cypress-io javascript
38055 MIT
Fast, easy and reliable testing for anything that runs in a browser.
by goldbergyoni javascript
16734 MIT
📗🌐 🚢 Comprehensive and exhaustive JavaScript & Node.js testing best practices (April 2022)
by testing-library javascript
16240 MIT
🐐 Simple and complete React DOM testing utilities that encourage good testing practices.
by Netflix go
10711 Apache-2.0
Chaos Monkey is a resiliency tool that helps applications tolerate random instance failures.
by DevExpress javascript
9302 MIT
A Node.js tool to automate end-to-end web testing.
by google shell
7257 Apache-2.0
OSS-Fuzz - continuous fuzzing for open source software.
by metersphere java
7173 GPL-3.0
MeterSphere 是一站式开源持续测试平台,覆盖测试管理、接口测试、性能测试等。搞测试,就选 MeterSphere!
by smartystreets go
6617 NOASSERTION
Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.
Trending New libraries in Testing
by metersphere java
7173 GPL-3.0
MeterSphere 是一站式开源持续测试平台,覆盖测试管理、接口测试、性能测试等。搞测试,就选 MeterSphere!
by microsoft python
6103 Apache-2.0
Python version of the Playwright testing and automation library.
by Orange-OpenSource rust
1326 Apache-2.0
Hurl, run and test HTTP requests with plain text.
by google python
904 Apache-2.0
by playbook-ui swift
882 Apache-2.0
📘A library for isolated developing UI components and automatically taking snapshots of them.
by storybookjs typescript
539 MIT
Testing utilities that allow you to reuse your Storybook stories in your React unit tests!
by googleprojectzero c++
520 Apache-2.0
Binary, coverage-guided fuzzer for Windows and macOS
by microsoft java
464 Apache-2.0
Java version of the Playwright testing and automation library
by Checksum shell
437 MIT
Dead simple testing framework for Bash with coverage reporting
Top Authors in Testing
1
14 Libraries
25654
2
12 Libraries
189
3
11 Libraries
555
4
11 Libraries
15301
5
11 Libraries
2381
6
9 Libraries
141
7
8 Libraries
68
8
8 Libraries
31
9
7 Libraries
6641
10
7 Libraries
983
1
14 Libraries
25654
2
12 Libraries
189
3
11 Libraries
555
4
11 Libraries
15301
5
11 Libraries
2381
6
9 Libraries
141
7
8 Libraries
68
8
8 Libraries
31
9
7 Libraries
6641
10
7 Libraries
983
Trending Kits in Testing
When it comes to testing software, it's very important to use high-quality test data. Well, thought out test data will help you write tests that catch bugs early on and easily identify the source of the problem. The data should be realistic, varied, and clear so that you can easily understand what is being tested. Also, it's helpful if the test data is small enough to be able to work with it directly in the code. In this kit we look at 7 different Java testing data libraries designed to help you generate random test data for your Java application. AutoParams - Arbitrary test data generator for parameterized tests; cglib - high level API to generate and transform Java byte code; datafactory - Java library for generating test data.
Test data are important for many reasons, but the most obvious is that they help you simulate a real user environment. You can use them to test your front-end CSS stylesheets, to make sure your JavaScript code handles all edge cases, and more. But more importantly, you should always be on the lookout for new and better test data. The PHP community is constantly producing new libraries that can help you write better tests. A good test suite is one that's reliable and easy to maintain, but if you're just starting out, it's easy to get overwhelmed with the task of writing your own test suite. If you're looking for a library to help get you started, here are some of the best options available on the market today: Fabricate - PHP data generator; samsui - factory library for building PHP objects useful; magical-girl - PHP library that insert testdata to your database.
In the world of big data, developers are always on a lookout for a good tool that can process and analyze data in a more effective way for deriving meaningful insights. Python is one of the most preferred languages that is widely used by developers to write powerful and efficient code. Python testing frameworks are used by programmers to test source codes in various domains before its final implementation. You can test any application using multiple frameworks in Python, but it is necessary to choose a framework that suits your business needs and requirements.. Here are best 10 Python Testing Data libraries that you must know in 2022. faker - Faker is a Python package that generates fake data for you; mimesis - highperformance fake data generator; RIDE - Test data editor for Robot Framework.
Tests are an integral part of any software project. The best way to write robust tests is to use good data - and that's where testing data libraries come in.. JavaScript Testing Data libraries help you to create meaningful data sets that can be used for testing user interfaces. This is especially useful for testing forms, inputs, search fields and more. Here are some of the 8 best JavaScript Testing Data libraries that you must know in 2022. Buckets-JS - fully tested and documented data structure library written; rosie - building JavaScript objects, mostly useful; Meteor - package for creating test data or generating fixtures
Ruby testing data open source libraries are the best option to generate realistic test data sets. They allow you to seed a database with multiple entries and then make assertions against it. This is a powerful method of testing because it lets you make assertions against real values in your database, which is how your application will be used in production. Ruby Testing Data is a curated collection of some of the best Ruby testing data gems for your project. Create massive amounts of realistic fake data for testing, running simulations, and creating analytics. factory_bot - A library for setting up Ruby objects as test data; traver - Test data generation framework; dataset exceptional tool for creating test data sets using ActiveRecord.
Unit testing is typically done by developers as they work on code (white-box style), to ensure that the specific function of that unit and its output are as expected, given a known input. By automating this process, any changes to the code will result in easy-to-read outputs that document the changes and whether or not those changes caused any new errors (i.e., regression). This can be simply a yes or no answer, a percentage of passed tests, or a more detailed report showing which tests were completed and how long they took. For testing, you need to create test data. There is a lot of test data open source libraries available on the internet. This list will talk about the most popular 5 C++ of them and how they help test developers like EDASkel - A skeleton EDA App in C, featuring design data parsers; SparseMatrixLibraries - Test cases demonstrating different sparse matrix libraries; ACME - This repository contains opensource C code for reconstructing membranes from timelapse confocal/2photon image data.
The first step in unit testing is to isolate the piece of code to be tested. This is done by placing it into a class or function library. Testing data is important for the effectiveness of this isolation because it allows developers to verify that their code works properly in a variety of scenarios. One way to do this would be by manually entering them as arguments every time you want to run one of your test cases - which can get tedious very quickly! A faster option would be using Test Data Libraries (TDLs). Let’s see the 11 best open-source C# Testing Data Libraries in 2022: GenFu - generate realistic test data; AutoFixture - open source library for .NET designed; Bogus - sane fake data generator.
As the Github Go page explains, this language was created because the developers at Google needed a language that would handle the needs of their projects. It also needed to be fast, which can be difficult when it comes to languages that come with dynamic features.. Go testing data is a library for using test data in Go tests. It can generate random, pseudo-random or pre-defined values for struct fields, variables and arrays. It is useful for benchmarking, fuzzing and test isolation. In many cases, proper data mocking can make testing simpler and more effective than if the tests relied on real data. Here is a short list of 11 open source libraries that provide utilities for generating random test data in the Go language including gemini - Test data integrity by comparing against an Oracle running; testsql - Generate test data from SQL files; Dr Test -helps you to generate random test data that satisfy your schema definitions.
C++ is a major programming language that has been around for decades. It is one of the languages you see in many software development tasks and across a variety of platforms. One big problem with C++ is the lack of testing tools. This is why developers often rely on open-source testing libraries to get the job done. As a C++ developer, you probably know how important quality assurance is. Fortunately, there are many C++ unit testing frameworks that can help you deliver better software. In this kit, we will present you the best C++ testing tools and frameworks in 2022. CMock - Mock/stub generator for C; libawful - A collection of awful archetypes to ease the testing of generic C libraries; UTBotCpp - Tool that generates unit test by C/C++ source code, trying to reach all branches and maximize code c.
Writing tests comes with a lot of benefits and is a crucial part of your development process. You should always write tests after you write code and make sure the new test fails before you fix the bug. Software testing is an integral part of the software development process. So, it's very important to choose the right C# library for advanced automated testing. Now we can look at 12 best C# Testing libraries in 2022. Most of these libraries can be used for multiple purposes like testing, debugging, etc. Write tests that are expressive, human readable and easy to maintain. ReportGenerator - converts coverage reports generated; GenFu - generate realistic test data; nbuilder - Rapid generation of test objects in .NET.
Testing is one of the most important parts of the software development process. You can either do it manually or use automated testing. However, automation has its own advantages over manual testing. Manual testing can be time-consuming and has a large chance of human error. Automated software testing is preferred in most cases because you can run tests repeatedly and at any time you want. It helps developers identify bugs early in the development cycle and rectify them as soon as possible. Go is an open-source programming language that makes it easy to build simple, reliable, and efficient software. Go provides a built-in package called “testing” that you can use for writing unit tests for your application. In this kit, there are many other tools available for Go that you can use for your test suites to make them more powerful and easier to write. gotests - Automatically generate Go test boilerplate from your source code; goreporter - Golang tool that does static analysis, unit testing, code review; moq - Interface mocking tool for go generate.
Ruby is one of the most popular programming languages in the world and has been used in web development for many applications. A plethora of Ruby libraries are available that can be used to test and debug applications built on Ruby. The standard tools provided by Ruby are a bit outdated and so developers are looking for alternatives. Ruby testing also helps you get more accurate feedback on your code and products, learn more about your users and buyers, and ensure that the products you create are as well-made as possible. With the right approach, testing in Ruby can become a key part of any developer/designer/marketer’s workflow. In this kit, we will cover some of the best open-source Ruby testing libraries that you should know about. Most of these libraries can be used for multiple purposes like testing, debugging, etc. slather - Generate test coverage reports for Xcode projects; active_mocker - Generate mocks from ActiveRecord models for unit tests; puppet-retrospec - generate puppet code.
Unit testing is a component of test-driven development (TDD), a pragmatic methodology that takes a meticulous approach to build a product by means of continual testing and revision. In TDD, test cases are initially created by the developer before they start developing their application. This method of test can be applied virtually to every level of software testing: unit, integration, system and acceptance. In this list, we've rounded up 19 good Open Source libraries that you can use in your projects now. Top libraries include goreporter - Golang tool that does static analysis, unit testing, code review; gomonkey - make monkey patching in unit tests easy; keploy - No code API testing platform Create unit tests and data mocks from API calls.
This code demonstrates how a simple linear regression model can be trained and used to make predictions in Python using the sci-kit-learn library. The LinearRegression class from the sklearn.linear_model module in sci-kit-learn is used to build and train linear regression models in Python.
Linear Regression is a supervised machine learning algorithm used for regression problems. In regression problems, the goal is to predict a continuous target variable based on one or more input variables. The linear regression algorithm fits a linear equation to the observed data between the dependent (target) and independent (predictor) variables. The equation is represented by a line that best captures the relationship between the variables.
The model.predict() method in sci-kit-learn's LinearRegression class is used to make predictions for new data based on a trained linear regression model.
Linear Regression is widely used for many applications, including forecasting, modeling, and understanding the relationship between variables.
Preview of the output that you will get on running this code from your IDE
Code
In this solution we have used LinearRegression
- Copy the code using the "Copy" button above, and paste it in a Python file in your IDE.
- Run the file to get the output
I hope you found this useful. I have added the link to dependent libraries, version information in the following sections.
I found this code snippet by searching for "use .predict() method in python for Linear regression" in kandi. You can try any such use case!
Environment Tested
I tested this solution in the following versions. Be mindful of changes when working with other versions.
- The solution is created in Python 3.7.15 version
- The solution is tested on sci-kit-learn 1.0.2 version
- The solution is tested on numpy 1.21.6 version
Using this solution, we are able going to learn how to predict a simple linear regression model using Scikit learn library in Python with simple steps. This process also facilities an easy-to-use, hassle-free method to create a hands-on working version of code which would help use the .predict() method in python for Linear regression in Python.
Dependent Library
If you do not have Scikit-learn and numpy that is required to run this code, you can install it by clicking on the above link and copying the pip Install command from the Scikit-learn page in kandi.
You can search for any dependent library on kandi like Scikit-learn. and numpy
Support
- For any support on kandi solution kits, please use the chat
- For further learning resources, visit the Open Weaver Community learning page.
Automated testing is a major part of the software development life cycle. It is a crucial element that can make or break your project. In the past few years, we witnessed a huge surge in the number of test automation tools. No matter what type of software you are creating, you will always need to add automated testing to your development process. Some of these tests are unit tests, UI tests, integration tests, and so on. There are many things to consider when choosing an automated testing tool for your Java project — ease of use, maintainability, cost, and adaptability. If you are new to test automation, it can be difficult to understand what tools are out there and which tools suit your needs. The following is a comprehensive list of the best Java test automation open source libraries.
Python has become the primary tool of choice for automating tests and handling failures. The language is well suited to writing robust, clear tests, and with the right libraries Python can be a very effective test automation tool. A test suite is a collection of automated tests that verify the application under test (AUT) works as designed. Automation can improve the speed and quality of your testing. The libraries below are some of our favorite open source Python test automation tools. They're easy to pick up and use, and can help you automate your tests so you can spend more time doing what you do best — writing great code! The following is a comprehensive list of the best Java test automation open source libraries.
Automated software testing is becoming more and more important for many software projects in order to automatically verify key functionality, test for regressions and help teams run a large number of tests in a short period of time. Many teams (especially larger projects) still require a significant amount of manual functional testing in addition to automated testing, either because of the lack of sufficient resources or skills to automate all tests Test automation offers a possibility to perform these types of testing effectively. Almost any software project will have an increasing need for test automation. The following five best C++ test automation tools are designed specifically for C++ developers who want to create and run unit tests to ensure their code works correctly.
JavaScript is a multi-paradigm language with support for event-driven, functional, and imperative (including object-oriented and prototype-based) programming styles. It has an API for working with text, arrays, dates and regular expressions, but does not include any I/O, such as networking, storage or graphics facilities. There are many frameworks that can be used for JavaScript Test Automation. JavaScript can be used for both frontend as well as backend application development. So, if you are developing a web application using JavaScript then you can execute test scripts written in JavaScript itself to automate your web app tests. There are several test automation. We have gathered the most popular JavaScript testing tools and their features, pros and cons. After reading this kit you will be able to pick the right library for your project. Let’s see which of them are the most popular ones in 2022.
Test automation has the potential to make the software development process faster, more efficient and more secure. Software testers have been using test automation tools for many years now, but despite their benefits, test automation solutions are not used as extensively as they should be. According to a report by Deloitte, only around 30% of functional tests are automated and about 34% of companies do not currently use any test automation tools at all. Test automation can and must be successfully implemented in every organization that cares about the quality of its software products. However, choosing a suitable library may prove quite difficult since there are many test automation frameworks on the market today. That's why we gave given you the best 13 lists of open-source C# Test Automation libraries are provided in this kit,
Testing is all about automation and these days, it’s an important part of the software development process. Automated testing is a very important part of continuous integration. It’s not only used for web applications but also for APIs and mobile apps. TDD is an approach to software development that combines testing and coding. The main idea behind TDD is to write the tests for your code first, and only then write the code. Such approach allows you to deliver new features to production faster by writing only necessary code, while keeping bugs at a minimum If you are new to Go, or you are looking for a new approach to test your web applications, then this list will help you to find the best Go test automation libraries that can be used for your project. We’ve compiled a list of the top Go test automation frameworks that you may find useful during your next project.
Trending Discussions on Testing
Unknown host CPU architecture: arm64 , Android NDK SiliconM1 Apple MacBook Pro
Constant FILTER_SANITIZE_STRING is deprecated
Why is it faster to compare strings that match than strings that do not?
Invalid options object. Dev Server has been initialized using an options object that does not match the API schema
The unauthenticated git protocol on port 9418 is no longer supported
Consider using the "jsdom" test environment
Installing scipy and scikit-learn on apple m1
TypeError: load() missing 1 required positional argument: 'Loader' in Google Colab
Switch' is not exported from 'react-router-dom'
IntelliJ - Git is not installed: Cannot identify version of git executable: no response
QUESTION
Unknown host CPU architecture: arm64 , Android NDK SiliconM1 Apple MacBook Pro
Asked 2022-Apr-04 at 18:41I've got a project that is working fine in windows os but when I switched my laptop and opened an existing project in MacBook Pro M1. I'm unable to run an existing android project in MacBook pro M1. first I was getting
Execution failed for task ':app:kaptDevDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution > java.lang.reflect.InvocationTargetException (no error message)
this error was due to the Room database I applied a fix that was adding below library before Room database and also changed my JDK location from file structure from JRE to JDK.
kapt "org.xerial:sqlite-jdbc:3.34.0"
1 //Room components
2 kapt "org.xerial:sqlite-jdbc:3.34.0"
3 implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4 kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5 androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6
after that now I'm getting an issue which is Unknown host CPU architecture: arm64
there is an SDK in my project that is using this below line.
1 //Room components
2 kapt "org.xerial:sqlite-jdbc:3.34.0"
3 implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4 kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5 androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7 externalNativeBuild {
8 ndkBuild {
9 path 'Android.mk'
10 }
11 }
12 ndkVersion '21.4.7075529'
13
14
15}
16
App Gradle
1 //Room components
2 kapt "org.xerial:sqlite-jdbc:3.34.0"
3 implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4 kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5 androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7 externalNativeBuild {
8 ndkBuild {
9 path 'Android.mk'
10 }
11 }
12 ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17 cmake {
18 path "src/main/cpp/CMakeLists.txt"
19 version "3.18.1"
20 //version "3.10.2"
21 }
22 }
23
[CXX1405] error when building with ndkBuild using /Users/mac/Desktop/Consumer-Android/ime/dictionaries/jnidictionaryv2/Android.mk: Build command failed. Error while executing process /Users/mac/Library/Android/sdk/ndk/21.4.7075529/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/mac/Desktop/Consumer-Android/ime/dictionaries/jnidictionaryv2/Android.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=/Users/mac/Desktop/Consumer-Android/ime/dictionaries/jnidictionaryv2/build/intermediates/cxx/Debug/4k4s2lc6/obj NDK_LIBS_OUT=/Users/mac/Desktop/Consumer-Android/ime/dictionaries/jnidictionaryv2/build/intermediates/cxx/Debug/4k4s2lc6/lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n} ERROR: Unknown host CPU architecture: arm64
which is causing this issue and whenever I comment on this line
path 'Android.mk'
it starts working fine, is there any way around which will help me run this project with this piece of code without getting this NDK issue?
Update - It seems that Room got fixed in the latest updates, Therefore you may consider updating Room to latest version (2.3.0-alpha01 / 2.4.0-alpha03 or above)
ANSWER
Answered 2022-Apr-04 at 18:41To solve this on a Apple Silicon M1 I found three options
AUse NDK 24
1 //Room components
2 kapt "org.xerial:sqlite-jdbc:3.34.0"
3 implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4 kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5 androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7 externalNativeBuild {
8 ndkBuild {
9 path 'Android.mk'
10 }
11 }
12 ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17 cmake {
18 path "src/main/cpp/CMakeLists.txt"
19 version "3.18.1"
20 //version "3.10.2"
21 }
22 }
23android {
24 ndkVersion "24.0.8215888"
25 ...
26}
27
You can install it with
1 //Room components
2 kapt "org.xerial:sqlite-jdbc:3.34.0"
3 implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4 kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5 androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7 externalNativeBuild {
8 ndkBuild {
9 path 'Android.mk'
10 }
11 }
12 ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17 cmake {
18 path "src/main/cpp/CMakeLists.txt"
19 version "3.18.1"
20 //version "3.10.2"
21 }
22 }
23android {
24 ndkVersion "24.0.8215888"
25 ...
26}
27echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
28
or
1 //Room components
2 kapt "org.xerial:sqlite-jdbc:3.34.0"
3 implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4 kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5 androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7 externalNativeBuild {
8 ndkBuild {
9 path 'Android.mk'
10 }
11 }
12 ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17 cmake {
18 path "src/main/cpp/CMakeLists.txt"
19 version "3.18.1"
20 //version "3.10.2"
21 }
22 }
23android {
24 ndkVersion "24.0.8215888"
25 ...
26}
27echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
28echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
29
Depending what where sdkmanager
is located
Change your ndk-build
to use Rosetta x86. Search for your installed ndk with
1 //Room components
2 kapt "org.xerial:sqlite-jdbc:3.34.0"
3 implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4 kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5 androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7 externalNativeBuild {
8 ndkBuild {
9 path 'Android.mk'
10 }
11 }
12 ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17 cmake {
18 path "src/main/cpp/CMakeLists.txt"
19 version "3.18.1"
20 //version "3.10.2"
21 }
22 }
23android {
24 ndkVersion "24.0.8215888"
25 ...
26}
27echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
28echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
29find ~ -name ndk-build 2>/dev/null
30
eg
1 //Room components
2 kapt "org.xerial:sqlite-jdbc:3.34.0"
3 implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4 kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5 androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7 externalNativeBuild {
8 ndkBuild {
9 path 'Android.mk'
10 }
11 }
12 ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17 cmake {
18 path "src/main/cpp/CMakeLists.txt"
19 version "3.18.1"
20 //version "3.10.2"
21 }
22 }
23android {
24 ndkVersion "24.0.8215888"
25 ...
26}
27echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
28echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
29find ~ -name ndk-build 2>/dev/null
30vi ~/Library/Android/sdk/ndk/22.1.7171670/ndk-build
31
and change
1 //Room components
2 kapt "org.xerial:sqlite-jdbc:3.34.0"
3 implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4 kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5 androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7 externalNativeBuild {
8 ndkBuild {
9 path 'Android.mk'
10 }
11 }
12 ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17 cmake {
18 path "src/main/cpp/CMakeLists.txt"
19 version "3.18.1"
20 //version "3.10.2"
21 }
22 }
23android {
24 ndkVersion "24.0.8215888"
25 ...
26}
27echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
28echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
29find ~ -name ndk-build 2>/dev/null
30vi ~/Library/Android/sdk/ndk/22.1.7171670/ndk-build
31DIR="$(cd "$(dirname "$0")" && pwd)"
32$DIR/build/ndk-build "$@"
33
to
1 //Room components
2 kapt "org.xerial:sqlite-jdbc:3.34.0"
3 implementation "androidx.room:room-ktx:$rootProject.roomVersion"
4 kapt "androidx.room:room-compiler:$rootProject.roomVersion"
5 androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
6android {
7 externalNativeBuild {
8 ndkBuild {
9 path 'Android.mk'
10 }
11 }
12 ndkVersion '21.4.7075529'
13
14
15}
16 externalNativeBuild {
17 cmake {
18 path "src/main/cpp/CMakeLists.txt"
19 version "3.18.1"
20 //version "3.10.2"
21 }
22 }
23android {
24 ndkVersion "24.0.8215888"
25 ...
26}
27echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
28echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
29find ~ -name ndk-build 2>/dev/null
30vi ~/Library/Android/sdk/ndk/22.1.7171670/ndk-build
31DIR="$(cd "$(dirname "$0")" && pwd)"
32$DIR/build/ndk-build "$@"
33DIR="$(cd "$(dirname "$0")" && pwd)"
34arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"
35
QUESTION
Constant FILTER_SANITIZE_STRING is deprecated
Asked 2022-Mar-30 at 13:01I have installed PHP 8.1 and I started testing my old project. I have used the filter FILTER_SANITIZE_STRING
like so:
1$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);
2
Now I get this error:
Deprecated: Constant FILTER_SANITIZE_STRING is deprecated
The same happens when I use FILTER_SANITIZE_STRIPPED
:
Deprecated: Constant FILTER_SANITIZE_STRIPPED is deprecated
What can I replace it with?
ANSWER
Answered 2022-Jan-15 at 14:59This was a filter of dubious purpose. It's difficult to say what it was meant to accomplish exactly or when it should be used. It was also confused with the default string filter, due to its name, when in reality the default string filter is called FILTER_UNSAFE_RAW
. The PHP community decided that the usage of this filter should not be supported anymore.
The behaviour of this filter was very unintuitive. It removed everything between <
and the end of the string or until the next >
. It also removed all NUL
bytes. Finally, it encoded '
and "
into their HTML entities.
If you want to replace it, you have a couple of options:
Use the default string filter
FILTER_UNSAFE_RAW
that doesn't do any filtering. This should be used if you had no idea about the behaviour ofFILTER_SANITIZE_STRING
and you just want to use a default filter that will give you the string value.If you used this filter to protect against XSS vulnerabilities, then replace its usage with
htmlspecialchars()
. Don't call this function on the input data. To protect against XSS you need to encode the output!If you knew exactly what that filter does and you want to create a polyfill, you can do that easily with regex.
1$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);
2function filter_string_polyfill(string $string): string
3{
4 $str = preg_replace('/\x00|<[^>]*>?/', '', $string);
5 return str_replace(["'", '"'], ['&#39;', '&#34;'], $str);
6}
7
QUESTION
Why is it faster to compare strings that match than strings that do not?
Asked 2022-Mar-30 at 11:58Here are two measurements:
1timeit.timeit('"toto"=="1234"', number=100000000)
21.8320042459999968
3timeit.timeit('"toto"=="toto"', number=100000000)
41.4517491540000265
5
As you can see, comparing two strings that match is faster than comparing two strings with the same size that do not match.
This is quite disturbing: During a string comparison, I believed that Python was testing strings character by character, so "toto"=="toto"
should be longer to test than "toto"=="1234"
as it requires four tests against one for the non-matching comparison. Maybe the comparison is hash-based, but in this case, timings should be the same for both comparisons.
Why?
ANSWER
Answered 2022-Mar-30 at 11:57Combining my comment and the comment by @khelwood:
TL;DR:
When analysing the bytecode for the two comparisons, it reveals the 'time'
and 'time'
strings are assigned to the same object. Therefore, an up-front identity check (at C-level) is the reason for the increased comparison speed.
The reason for the same object assignment is that, as an implementation detail, CPython interns strings which contain only 'name characters' (i.e. alpha and underscore characters). This enables the object's identity check.
Bytecode:
1timeit.timeit('"toto"=="1234"', number=100000000)
21.8320042459999968
3timeit.timeit('"toto"=="toto"', number=100000000)
41.4517491540000265
5import dis
6
7In [24]: dis.dis("'time'=='time'")
8 1 0 LOAD_CONST 0 ('time') # <-- same object (0)
9 2 LOAD_CONST 0 ('time') # <-- same object (0)
10 4 COMPARE_OP 2 (==)
11 6 RETURN_VALUE
12
13In [25]: dis.dis("'time'=='1234'")
14 1 0 LOAD_CONST 0 ('time') # <-- different object (0)
15 2 LOAD_CONST 1 ('1234') # <-- different object (1)
16 4 COMPARE_OP 2 (==)
17 6 RETURN_VALUE
18
Assignment Timing:
The 'speed-up' can also be seen in using assignment for the time tests. The assignment (and compare) of two variables to the same string, is faster than the assignment (and compare) of two variables to different strings. Further supporting the hypothesis the underlying logic is performing an object comparison. This is confirmed in the next section.
1timeit.timeit('"toto"=="1234"', number=100000000)
21.8320042459999968
3timeit.timeit('"toto"=="toto"', number=100000000)
41.4517491540000265
5import dis
6
7In [24]: dis.dis("'time'=='time'")
8 1 0 LOAD_CONST 0 ('time') # <-- same object (0)
9 2 LOAD_CONST 0 ('time') # <-- same object (0)
10 4 COMPARE_OP 2 (==)
11 6 RETURN_VALUE
12
13In [25]: dis.dis("'time'=='1234'")
14 1 0 LOAD_CONST 0 ('time') # <-- different object (0)
15 2 LOAD_CONST 1 ('1234') # <-- different object (1)
16 4 COMPARE_OP 2 (==)
17 6 RETURN_VALUE
18In [26]: timeit.timeit("x='time'; y='time'; x==y", number=1000000)
19Out[26]: 0.0745926329982467
20
21In [27]: timeit.timeit("x='time'; y='1234'; x==y", number=1000000)
22Out[27]: 0.10328884399496019
23
Python source code:
As helpfully provided by @mkrieger1 and @Masklinn in their comments, the source code for unicodeobject.c
performs a pointer comparison first and if True
, returns immediately.
1timeit.timeit('"toto"=="1234"', number=100000000)
21.8320042459999968
3timeit.timeit('"toto"=="toto"', number=100000000)
41.4517491540000265
5import dis
6
7In [24]: dis.dis("'time'=='time'")
8 1 0 LOAD_CONST 0 ('time') # <-- same object (0)
9 2 LOAD_CONST 0 ('time') # <-- same object (0)
10 4 COMPARE_OP 2 (==)
11 6 RETURN_VALUE
12
13In [25]: dis.dis("'time'=='1234'")
14 1 0 LOAD_CONST 0 ('time') # <-- different object (0)
15 2 LOAD_CONST 1 ('1234') # <-- different object (1)
16 4 COMPARE_OP 2 (==)
17 6 RETURN_VALUE
18In [26]: timeit.timeit("x='time'; y='time'; x==y", number=1000000)
19Out[26]: 0.0745926329982467
20
21In [27]: timeit.timeit("x='time'; y='1234'; x==y", number=1000000)
22Out[27]: 0.10328884399496019
23int
24_PyUnicode_Equal(PyObject *str1, PyObject *str2)
25{
26 assert(PyUnicode_CheckExact(str1));
27 assert(PyUnicode_CheckExact(str2));
28 if (str1 == str2) { // <-- Here
29 return 1;
30 }
31 if (PyUnicode_READY(str1) || PyUnicode_READY(str2)) {
32 return -1;
33 }
34 return unicode_compare_eq(str1, str2);
35}
36
Appendix:
- Reference answer nicely illustrating how to read the disassembled bytecode output. Courtesy of @Delgan
- Reference answer which nicely describes CPython's string interning. Coutresy of @ShadowRanger
QUESTION
Invalid options object. Dev Server has been initialized using an options object that does not match the API schema
Asked 2022-Mar-28 at 21:08I have been stock on this error on my project when I add "proxy": "http://localhost:6000"
in my package.json.
This is the error response after yarn start.
Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.allowedHosts[0] should be a non-empty string. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
But everything is fine when I remove the "proxy": "http://localhost:6000"
.
This is on my package.json:
1{
2 "name": "client",
3 "version": "0.1.0",
4 "private": true,
5 "dependencies": {
6 "@material-ui/core": "^4.12.3",
7 "@testing-library/jest-dom": "^5.16.1",
8 "@testing-library/react": "^12.1.2",
9 "@testing-library/user-event": "^13.5.0",
10 "axios": "^0.24.0",
11 "moment": "^2.29.1",
12 "react": "^17.0.2",
13 "react-dom": "^17.0.2",
14 "react-file-base64": "^1.0.3",
15 "react-redux": "^7.2.6",
16 "react-scripts": "5.0.0",
17 "redux": "^4.1.2",
18 "redux-thunk": "^2.4.1",
19 "web-vitals": "^2.1.2"
20 },
21 "scripts": {
22 "start": "react-scripts start",
23 "build": "react-scripts build",
24 "test": "react-scripts test",
25 "eject": "react-scripts eject"
26 },
27 "eslintConfig": {
28 "extends": [
29 "react-app",
30 "react-app/jest"
31 ]
32 },
33 "browserslist": {
34 "production": [
35 ">0.2%",
36 "not dead",
37 "not op_mini all"
38 ],
39 "development": [
40 "last 1 chrome version",
41 "last 1 firefox version",
42 "last 1 safari version"
43 ]
44 },
45 "proxy": "http://localhost:6000"
46}
47
ANSWER
Answered 2021-Dec-19 at 16:06Here is a workaround. Delete "proxy": "http://localhost:6000". Install package http-proxy-middleware with command npm install http-proxy-middleware --save. Create a file setupProxy.js inside your src folder. Add these lines inside:
1{
2 "name": "client",
3 "version": "0.1.0",
4 "private": true,
5 "dependencies": {
6 "@material-ui/core": "^4.12.3",
7 "@testing-library/jest-dom": "^5.16.1",
8 "@testing-library/react": "^12.1.2",
9 "@testing-library/user-event": "^13.5.0",
10 "axios": "^0.24.0",
11 "moment": "^2.29.1",
12 "react": "^17.0.2",
13 "react-dom": "^17.0.2",
14 "react-file-base64": "^1.0.3",
15 "react-redux": "^7.2.6",
16 "react-scripts": "5.0.0",
17 "redux": "^4.1.2",
18 "redux-thunk": "^2.4.1",
19 "web-vitals": "^2.1.2"
20 },
21 "scripts": {
22 "start": "react-scripts start",
23 "build": "react-scripts build",
24 "test": "react-scripts test",
25 "eject": "react-scripts eject"
26 },
27 "eslintConfig": {
28 "extends": [
29 "react-app",
30 "react-app/jest"
31 ]
32 },
33 "browserslist": {
34 "production": [
35 ">0.2%",
36 "not dead",
37 "not op_mini all"
38 ],
39 "development": [
40 "last 1 chrome version",
41 "last 1 firefox version",
42 "last 1 safari version"
43 ]
44 },
45 "proxy": "http://localhost:6000"
46}
47const { createProxyMiddleware } = require('http-proxy-middleware');
48
49module.exports = function(app) {
50 app.use(
51 '/api',
52 createProxyMiddleware({
53 target: 'http://localhost:6000',
54 changeOrigin: true,
55 })
56 );
57};
58
Now, run your app. It should work.
QUESTION
The unauthenticated git protocol on port 9418 is no longer supported
Asked 2022-Mar-27 at 13:23I have been using github actions for quite sometime but today my deployments started failing. Below is the error from github action logs
1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error:
6 The unauthenticated git protocol on port 9418 is no longer supported.
7
Upon investigation, it appears that below section in my yml file is causing the issue.
1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error:
6 The unauthenticated git protocol on port 9418 is no longer supported.
7 - name: Installing modules
8 run: yarn install
9
I have looked into this change log but can't seem to comprehend the issue.
Additional Details: Server: EC2 Instance Github actions steps:
1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error:
6 The unauthenticated git protocol on port 9418 is no longer supported.
7 - name: Installing modules
8 run: yarn install
9 steps:
10 - name: Checkout
11 uses: actions/checkout@v2
12
13 - id: vars
14 run: |
15 if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream" ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
16
17 - uses: pCYSl5EDgo/cat@master
18 id: slack
19 with:
20 path: .github/workflows/slack.txt
21
22 - name: Slack Start Notification
23 uses: 8398a7/action-slack@v3
24 env:
25 SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26 ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27 COLOR: good
28 STATUS: '`Started`'
29 with:
30 status: custom
31 fields: workflow,job,commit,repo,ref,author,took
32 custom_payload: |
33 ${{ steps.slack.outputs.text }}
34
35 - name: Installing modules
36 env:
37 REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38 run: yarn install
39
40 - name: Create Frontend Build
41 env:
42 REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43 run: yarn build
44
45 - name: Deploy to Frontend Server DEV
46 if: ${{ contains(github.ref, 'dev') }}
47 uses: easingthemes/ssh-deploy@v2.1.5
48 env:
49 SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50 ARGS: '-rltgoDzvO --delete'
51 SOURCE: 'deploy/'
52 REMOTE_HOST: ${{ secrets.DEV_HOST }}
53 REMOTE_USER: plyfolio-dev
54 TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55
package.json file
1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error:
6 The unauthenticated git protocol on port 9418 is no longer supported.
7 - name: Installing modules
8 run: yarn install
9 steps:
10 - name: Checkout
11 uses: actions/checkout@v2
12
13 - id: vars
14 run: |
15 if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream" ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
16
17 - uses: pCYSl5EDgo/cat@master
18 id: slack
19 with:
20 path: .github/workflows/slack.txt
21
22 - name: Slack Start Notification
23 uses: 8398a7/action-slack@v3
24 env:
25 SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26 ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27 COLOR: good
28 STATUS: '`Started`'
29 with:
30 status: custom
31 fields: workflow,job,commit,repo,ref,author,took
32 custom_payload: |
33 ${{ steps.slack.outputs.text }}
34
35 - name: Installing modules
36 env:
37 REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38 run: yarn install
39
40 - name: Create Frontend Build
41 env:
42 REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43 run: yarn build
44
45 - name: Deploy to Frontend Server DEV
46 if: ${{ contains(github.ref, 'dev') }}
47 uses: easingthemes/ssh-deploy@v2.1.5
48 env:
49 SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50 ARGS: '-rltgoDzvO --delete'
51 SOURCE: 'deploy/'
52 REMOTE_HOST: ${{ secrets.DEV_HOST }}
53 REMOTE_USER: plyfolio-dev
54 TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55 {
56 "name": "stackstream-fe",
57 "version": "1.0.0",
58 "authors": [
59 "fayyaznofal@gmail.com"
60 ],
61 "private": true,
62 "dependencies": {
63 "@fortawesome/fontawesome-svg-core": "^1.2.34",
64 "@fortawesome/free-solid-svg-icons": "^5.15.2",
65 "@fortawesome/react-fontawesome": "^0.1.14",
66 "@fullcalendar/bootstrap": "^5.5.0",
67 "@fullcalendar/core": "^5.5.0",
68 "@fullcalendar/daygrid": "^5.5.0",
69 "@fullcalendar/interaction": "^5.5.0",
70 "@fullcalendar/react": "^5.5.0",
71 "@lourenci/react-kanban": "^2.1.0",
72 "@redux-saga/simple-saga-monitor": "^1.1.2",
73 "@testing-library/jest-dom": "^5.11.9",
74 "@testing-library/react": "^11.2.3",
75 "@testing-library/user-event": "^12.6.0",
76 "@toast-ui/react-chart": "^1.0.2",
77 "@types/jest": "^26.0.14",
78 "@types/node": "^14.10.3",
79 "@types/react": "^16.9.49",
80 "@types/react-dom": "^16.9.8",
81 "@vtaits/react-color-picker": "^0.1.1",
82 "apexcharts": "^3.23.1",
83 "availity-reactstrap-validation": "^2.7.0",
84 "axios": "^0.21.1",
85 "axios-mock-adapter": "^1.19.0",
86 "axios-progress-bar": "^1.2.0",
87 "bootstrap": "^5.0.0-beta2",
88 "chart.js": "^2.9.4",
89 "chartist": "^0.11.4",
90 "classnames": "^2.2.6",
91 "components": "^0.1.0",
92 "dotenv": "^8.2.0",
93 "draft-js": "^0.11.7",
94 "echarts": "^4.9.0",
95 "echarts-for-react": "^2.0.16",
96 "firebase": "^8.2.3",
97 "google-maps-react": "^2.0.6",
98 "history": "^4.10.1",
99 "i": "^0.3.6",
100 "i18next": "^19.8.4",
101 "i18next-browser-languagedetector": "^6.0.1",
102 "jsonwebtoken": "^8.5.1",
103 "leaflet": "^1.7.1",
104 "lodash": "^4.17.21",
105 "lodash.clonedeep": "^4.5.0",
106 "lodash.get": "^4.4.2",
107 "metismenujs": "^1.2.1",
108 "mkdirp": "^1.0.4",
109 "moment": "2.29.1",
110 "moment-timezone": "^0.5.32",
111 "nouislider-react": "^3.3.9",
112 "npm": "^7.6.3",
113 "prop-types": "^15.7.2",
114 "query-string": "^6.14.0",
115 "react": "^16.13.1",
116 "react-apexcharts": "^1.3.7",
117 "react-auth-code-input": "^1.0.0",
118 "react-avatar": "^3.10.0",
119 "react-bootstrap": "^1.5.0",
120 "react-bootstrap-editable": "^0.8.2",
121 "react-bootstrap-sweetalert": "^5.2.0",
122 "react-bootstrap-table-next": "^4.0.3",
123 "react-bootstrap-table2-editor": "^1.4.0",
124 "react-bootstrap-table2-paginator": "^2.1.2",
125 "react-bootstrap-table2-toolkit": "^2.1.3",
126 "react-chartist": "^0.14.3",
127 "react-chartjs-2": "^2.11.1",
128 "react-color": "^2.19.3",
129 "react-confirm-alert": "^2.7.0",
130 "react-content-loader": "^6.0.1",
131 "react-countdown": "^2.3.1",
132 "react-countup": "^4.3.3",
133 "react-cropper": "^2.1.4",
134 "react-data-table-component": "^6.11.8",
135 "react-date-picker": "^8.0.6",
136 "react-datepicker": "^3.4.1",
137 "react-dom": "^16.13.1",
138 "react-draft-wysiwyg": "^1.14.5",
139 "react-drag-listview": "^0.1.8",
140 "react-drawer": "^1.3.4",
141 "react-dropzone": "^11.2.4",
142 "react-dual-listbox": "^2.0.0",
143 "react-facebook-login": "^4.1.1",
144 "react-flatpickr": "^3.10.6",
145 "react-google-login": "^5.2.2",
146 "react-hook-form": "^7.15.2",
147 "react-i18next": "^11.8.5",
148 "react-icons": "^4.2.0",
149 "react-image-lightbox": "^5.1.1",
150 "react-input-mask": "^2.0.4",
151 "react-jvectormap": "^0.0.16",
152 "react-leaflet": "^3.0.5",
153 "react-meta-tags": "^1.0.1",
154 "react-modal-video": "^1.2.6",
155 "react-notifications": "^1.7.2",
156 "react-number-format": "^4.7.3",
157 "react-perfect-scrollbar": "^1.5.8",
158 "react-rangeslider": "^2.2.0",
159 "react-rating": "^2.0.5",
160 "react-rating-tooltip": "^1.1.6",
161 "react-redux": "^7.2.1",
162 "react-responsive-carousel": "^3.2.11",
163 "react-router-dom": "^5.2.0",
164 "react-script": "^2.0.5",
165 "react-scripts": "3.4.3",
166 "react-select": "^4.3.1",
167 "react-sparklines": "^1.7.0",
168 "react-star-ratings": "^2.3.0",
169 "react-super-responsive-table": "^5.2.0",
170 "react-switch": "^6.0.0",
171 "react-table": "^7.6.3",
172 "react-toastify": "^7.0.3",
173 "react-toastr": "^3.0.0",
174 "react-twitter-auth": "0.0.13",
175 "reactstrap": "^8.8.1",
176 "recharts": "^2.0.8",
177 "redux": "^4.0.5",
178 "redux-saga": "^1.1.3",
179 "reselect": "^4.0.0",
180 "sass": "^1.37.5",
181 "simplebar-react": "^2.3.0",
182 "styled": "^1.0.0",
183 "styled-components": "^5.2.1",
184 "toastr": "^2.1.4",
185 "typescript": "^4.0.2",
186 "universal-cookie": "^4.0.4"
187 },
188 "devDependencies": {
189 "@typescript-eslint/eslint-plugin": "^2.27.0",
190 "@typescript-eslint/parser": "^2.27.0",
191 "@typescript-eslint/typescript-estree": "^4.15.2",
192 "eslint-config-prettier": "^6.10.1",
193 "eslint-plugin-prettier": "^3.1.2",
194 "husky": "^4.2.5",
195 "lint-staged": "^10.1.3",
196 "prettier": "^1.19.1",
197 "react-test-renderer": "^16.13.1",
198 "redux-devtools-extension": "^2.13.8",
199 "redux-mock-store": "^1.5.4"
200 },
201 "scripts": {
202 "start": "react-scripts start",
203 "build": "react-scripts build && mv build ./deploy/build",
204 "build-local": "react-scripts build",
205 "test": "react-scripts test",
206 "eject": "react-scripts eject"
207 },
208 "eslintConfig": {
209 "extends": "react-app"
210 },
211 "husky": {
212 "hooks": {
213 "pre-commit": "lint-staged"
214 }
215 },
216 "lint-staged": {
217 "*.{js,ts,tsx}": [
218 "eslint --fix"
219 ]
220 },
221 "browserslist": {
222 "production": [
223 ">0.2%",
224 "not dead",
225 "not op_mini all"
226 ],
227 "development": [
228 "last 1 chrome version",
229 "last 1 firefox version",
230 "last 1 safari version"
231 ]
232 }
233}
234
ANSWER
Answered 2022-Mar-16 at 07:01First, this error message is indeed expected on Jan. 11th, 2022.
See "Improving Git protocol security on GitHub".
January 11, 2022 Final brownout.
This is the full brownout period where we’ll temporarily stop accepting the deprecated key and signature types, ciphers, and MACs, and the unencrypted Git protocol.
This will help clients discover any lingering use of older keys or old URLs.
Second, check your package.json
dependencies for any git://
URL, as in this example, fixed in this PR.
As noted by Jörg W Mittag:
There was a 4-month warning.
The entire Internet has been moving away from unauthenticated, unencrypted protocols for a decade, it's not like this is a huge surprise.Personally, I consider it less an "issue" and more "detecting unmaintained dependencies".
Plus, this is still only the brownout period, so the protocol will only be disabled for a short period of time, allowing developers to discover the problem.
The permanent shutdown is not until March 15th.
For GitHub Actions:
As in actions/checkout issue 14, you can add as a first step:
1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error:
6 The unauthenticated git protocol on port 9418 is no longer supported.
7 - name: Installing modules
8 run: yarn install
9 steps:
10 - name: Checkout
11 uses: actions/checkout@v2
12
13 - id: vars
14 run: |
15 if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream" ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
16
17 - uses: pCYSl5EDgo/cat@master
18 id: slack
19 with:
20 path: .github/workflows/slack.txt
21
22 - name: Slack Start Notification
23 uses: 8398a7/action-slack@v3
24 env:
25 SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26 ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27 COLOR: good
28 STATUS: '`Started`'
29 with:
30 status: custom
31 fields: workflow,job,commit,repo,ref,author,took
32 custom_payload: |
33 ${{ steps.slack.outputs.text }}
34
35 - name: Installing modules
36 env:
37 REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38 run: yarn install
39
40 - name: Create Frontend Build
41 env:
42 REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43 run: yarn build
44
45 - name: Deploy to Frontend Server DEV
46 if: ${{ contains(github.ref, 'dev') }}
47 uses: easingthemes/ssh-deploy@v2.1.5
48 env:
49 SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50 ARGS: '-rltgoDzvO --delete'
51 SOURCE: 'deploy/'
52 REMOTE_HOST: ${{ secrets.DEV_HOST }}
53 REMOTE_USER: plyfolio-dev
54 TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55 {
56 "name": "stackstream-fe",
57 "version": "1.0.0",
58 "authors": [
59 "fayyaznofal@gmail.com"
60 ],
61 "private": true,
62 "dependencies": {
63 "@fortawesome/fontawesome-svg-core": "^1.2.34",
64 "@fortawesome/free-solid-svg-icons": "^5.15.2",
65 "@fortawesome/react-fontawesome": "^0.1.14",
66 "@fullcalendar/bootstrap": "^5.5.0",
67 "@fullcalendar/core": "^5.5.0",
68 "@fullcalendar/daygrid": "^5.5.0",
69 "@fullcalendar/interaction": "^5.5.0",
70 "@fullcalendar/react": "^5.5.0",
71 "@lourenci/react-kanban": "^2.1.0",
72 "@redux-saga/simple-saga-monitor": "^1.1.2",
73 "@testing-library/jest-dom": "^5.11.9",
74 "@testing-library/react": "^11.2.3",
75 "@testing-library/user-event": "^12.6.0",
76 "@toast-ui/react-chart": "^1.0.2",
77 "@types/jest": "^26.0.14",
78 "@types/node": "^14.10.3",
79 "@types/react": "^16.9.49",
80 "@types/react-dom": "^16.9.8",
81 "@vtaits/react-color-picker": "^0.1.1",
82 "apexcharts": "^3.23.1",
83 "availity-reactstrap-validation": "^2.7.0",
84 "axios": "^0.21.1",
85 "axios-mock-adapter": "^1.19.0",
86 "axios-progress-bar": "^1.2.0",
87 "bootstrap": "^5.0.0-beta2",
88 "chart.js": "^2.9.4",
89 "chartist": "^0.11.4",
90 "classnames": "^2.2.6",
91 "components": "^0.1.0",
92 "dotenv": "^8.2.0",
93 "draft-js": "^0.11.7",
94 "echarts": "^4.9.0",
95 "echarts-for-react": "^2.0.16",
96 "firebase": "^8.2.3",
97 "google-maps-react": "^2.0.6",
98 "history": "^4.10.1",
99 "i": "^0.3.6",
100 "i18next": "^19.8.4",
101 "i18next-browser-languagedetector": "^6.0.1",
102 "jsonwebtoken": "^8.5.1",
103 "leaflet": "^1.7.1",
104 "lodash": "^4.17.21",
105 "lodash.clonedeep": "^4.5.0",
106 "lodash.get": "^4.4.2",
107 "metismenujs": "^1.2.1",
108 "mkdirp": "^1.0.4",
109 "moment": "2.29.1",
110 "moment-timezone": "^0.5.32",
111 "nouislider-react": "^3.3.9",
112 "npm": "^7.6.3",
113 "prop-types": "^15.7.2",
114 "query-string": "^6.14.0",
115 "react": "^16.13.1",
116 "react-apexcharts": "^1.3.7",
117 "react-auth-code-input": "^1.0.0",
118 "react-avatar": "^3.10.0",
119 "react-bootstrap": "^1.5.0",
120 "react-bootstrap-editable": "^0.8.2",
121 "react-bootstrap-sweetalert": "^5.2.0",
122 "react-bootstrap-table-next": "^4.0.3",
123 "react-bootstrap-table2-editor": "^1.4.0",
124 "react-bootstrap-table2-paginator": "^2.1.2",
125 "react-bootstrap-table2-toolkit": "^2.1.3",
126 "react-chartist": "^0.14.3",
127 "react-chartjs-2": "^2.11.1",
128 "react-color": "^2.19.3",
129 "react-confirm-alert": "^2.7.0",
130 "react-content-loader": "^6.0.1",
131 "react-countdown": "^2.3.1",
132 "react-countup": "^4.3.3",
133 "react-cropper": "^2.1.4",
134 "react-data-table-component": "^6.11.8",
135 "react-date-picker": "^8.0.6",
136 "react-datepicker": "^3.4.1",
137 "react-dom": "^16.13.1",
138 "react-draft-wysiwyg": "^1.14.5",
139 "react-drag-listview": "^0.1.8",
140 "react-drawer": "^1.3.4",
141 "react-dropzone": "^11.2.4",
142 "react-dual-listbox": "^2.0.0",
143 "react-facebook-login": "^4.1.1",
144 "react-flatpickr": "^3.10.6",
145 "react-google-login": "^5.2.2",
146 "react-hook-form": "^7.15.2",
147 "react-i18next": "^11.8.5",
148 "react-icons": "^4.2.0",
149 "react-image-lightbox": "^5.1.1",
150 "react-input-mask": "^2.0.4",
151 "react-jvectormap": "^0.0.16",
152 "react-leaflet": "^3.0.5",
153 "react-meta-tags": "^1.0.1",
154 "react-modal-video": "^1.2.6",
155 "react-notifications": "^1.7.2",
156 "react-number-format": "^4.7.3",
157 "react-perfect-scrollbar": "^1.5.8",
158 "react-rangeslider": "^2.2.0",
159 "react-rating": "^2.0.5",
160 "react-rating-tooltip": "^1.1.6",
161 "react-redux": "^7.2.1",
162 "react-responsive-carousel": "^3.2.11",
163 "react-router-dom": "^5.2.0",
164 "react-script": "^2.0.5",
165 "react-scripts": "3.4.3",
166 "react-select": "^4.3.1",
167 "react-sparklines": "^1.7.0",
168 "react-star-ratings": "^2.3.0",
169 "react-super-responsive-table": "^5.2.0",
170 "react-switch": "^6.0.0",
171 "react-table": "^7.6.3",
172 "react-toastify": "^7.0.3",
173 "react-toastr": "^3.0.0",
174 "react-twitter-auth": "0.0.13",
175 "reactstrap": "^8.8.1",
176 "recharts": "^2.0.8",
177 "redux": "^4.0.5",
178 "redux-saga": "^1.1.3",
179 "reselect": "^4.0.0",
180 "sass": "^1.37.5",
181 "simplebar-react": "^2.3.0",
182 "styled": "^1.0.0",
183 "styled-components": "^5.2.1",
184 "toastr": "^2.1.4",
185 "typescript": "^4.0.2",
186 "universal-cookie": "^4.0.4"
187 },
188 "devDependencies": {
189 "@typescript-eslint/eslint-plugin": "^2.27.0",
190 "@typescript-eslint/parser": "^2.27.0",
191 "@typescript-eslint/typescript-estree": "^4.15.2",
192 "eslint-config-prettier": "^6.10.1",
193 "eslint-plugin-prettier": "^3.1.2",
194 "husky": "^4.2.5",
195 "lint-staged": "^10.1.3",
196 "prettier": "^1.19.1",
197 "react-test-renderer": "^16.13.1",
198 "redux-devtools-extension": "^2.13.8",
199 "redux-mock-store": "^1.5.4"
200 },
201 "scripts": {
202 "start": "react-scripts start",
203 "build": "react-scripts build && mv build ./deploy/build",
204 "build-local": "react-scripts build",
205 "test": "react-scripts test",
206 "eject": "react-scripts eject"
207 },
208 "eslintConfig": {
209 "extends": "react-app"
210 },
211 "husky": {
212 "hooks": {
213 "pre-commit": "lint-staged"
214 }
215 },
216 "lint-staged": {
217 "*.{js,ts,tsx}": [
218 "eslint --fix"
219 ]
220 },
221 "browserslist": {
222 "production": [
223 ">0.2%",
224 "not dead",
225 "not op_mini all"
226 ],
227 "development": [
228 "last 1 chrome version",
229 "last 1 firefox version",
230 "last 1 safari version"
231 ]
232 }
233}
234 - name: Fix up git URLs
235 run: echo -e '[url "https://github.com/"]\n insteadOf = "git://github.com/"' >> ~/.gitconfig
236
That will change any git://github.com/
into https://github.com/
.
For all your repositories, you can set:
1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error:
6 The unauthenticated git protocol on port 9418 is no longer supported.
7 - name: Installing modules
8 run: yarn install
9 steps:
10 - name: Checkout
11 uses: actions/checkout@v2
12
13 - id: vars
14 run: |
15 if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream" ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
16
17 - uses: pCYSl5EDgo/cat@master
18 id: slack
19 with:
20 path: .github/workflows/slack.txt
21
22 - name: Slack Start Notification
23 uses: 8398a7/action-slack@v3
24 env:
25 SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26 ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27 COLOR: good
28 STATUS: '`Started`'
29 with:
30 status: custom
31 fields: workflow,job,commit,repo,ref,author,took
32 custom_payload: |
33 ${{ steps.slack.outputs.text }}
34
35 - name: Installing modules
36 env:
37 REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38 run: yarn install
39
40 - name: Create Frontend Build
41 env:
42 REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43 run: yarn build
44
45 - name: Deploy to Frontend Server DEV
46 if: ${{ contains(github.ref, 'dev') }}
47 uses: easingthemes/ssh-deploy@v2.1.5
48 env:
49 SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50 ARGS: '-rltgoDzvO --delete'
51 SOURCE: 'deploy/'
52 REMOTE_HOST: ${{ secrets.DEV_HOST }}
53 REMOTE_USER: plyfolio-dev
54 TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55 {
56 "name": "stackstream-fe",
57 "version": "1.0.0",
58 "authors": [
59 "fayyaznofal@gmail.com"
60 ],
61 "private": true,
62 "dependencies": {
63 "@fortawesome/fontawesome-svg-core": "^1.2.34",
64 "@fortawesome/free-solid-svg-icons": "^5.15.2",
65 "@fortawesome/react-fontawesome": "^0.1.14",
66 "@fullcalendar/bootstrap": "^5.5.0",
67 "@fullcalendar/core": "^5.5.0",
68 "@fullcalendar/daygrid": "^5.5.0",
69 "@fullcalendar/interaction": "^5.5.0",
70 "@fullcalendar/react": "^5.5.0",
71 "@lourenci/react-kanban": "^2.1.0",
72 "@redux-saga/simple-saga-monitor": "^1.1.2",
73 "@testing-library/jest-dom": "^5.11.9",
74 "@testing-library/react": "^11.2.3",
75 "@testing-library/user-event": "^12.6.0",
76 "@toast-ui/react-chart": "^1.0.2",
77 "@types/jest": "^26.0.14",
78 "@types/node": "^14.10.3",
79 "@types/react": "^16.9.49",
80 "@types/react-dom": "^16.9.8",
81 "@vtaits/react-color-picker": "^0.1.1",
82 "apexcharts": "^3.23.1",
83 "availity-reactstrap-validation": "^2.7.0",
84 "axios": "^0.21.1",
85 "axios-mock-adapter": "^1.19.0",
86 "axios-progress-bar": "^1.2.0",
87 "bootstrap": "^5.0.0-beta2",
88 "chart.js": "^2.9.4",
89 "chartist": "^0.11.4",
90 "classnames": "^2.2.6",
91 "components": "^0.1.0",
92 "dotenv": "^8.2.0",
93 "draft-js": "^0.11.7",
94 "echarts": "^4.9.0",
95 "echarts-for-react": "^2.0.16",
96 "firebase": "^8.2.3",
97 "google-maps-react": "^2.0.6",
98 "history": "^4.10.1",
99 "i": "^0.3.6",
100 "i18next": "^19.8.4",
101 "i18next-browser-languagedetector": "^6.0.1",
102 "jsonwebtoken": "^8.5.1",
103 "leaflet": "^1.7.1",
104 "lodash": "^4.17.21",
105 "lodash.clonedeep": "^4.5.0",
106 "lodash.get": "^4.4.2",
107 "metismenujs": "^1.2.1",
108 "mkdirp": "^1.0.4",
109 "moment": "2.29.1",
110 "moment-timezone": "^0.5.32",
111 "nouislider-react": "^3.3.9",
112 "npm": "^7.6.3",
113 "prop-types": "^15.7.2",
114 "query-string": "^6.14.0",
115 "react": "^16.13.1",
116 "react-apexcharts": "^1.3.7",
117 "react-auth-code-input": "^1.0.0",
118 "react-avatar": "^3.10.0",
119 "react-bootstrap": "^1.5.0",
120 "react-bootstrap-editable": "^0.8.2",
121 "react-bootstrap-sweetalert": "^5.2.0",
122 "react-bootstrap-table-next": "^4.0.3",
123 "react-bootstrap-table2-editor": "^1.4.0",
124 "react-bootstrap-table2-paginator": "^2.1.2",
125 "react-bootstrap-table2-toolkit": "^2.1.3",
126 "react-chartist": "^0.14.3",
127 "react-chartjs-2": "^2.11.1",
128 "react-color": "^2.19.3",
129 "react-confirm-alert": "^2.7.0",
130 "react-content-loader": "^6.0.1",
131 "react-countdown": "^2.3.1",
132 "react-countup": "^4.3.3",
133 "react-cropper": "^2.1.4",
134 "react-data-table-component": "^6.11.8",
135 "react-date-picker": "^8.0.6",
136 "react-datepicker": "^3.4.1",
137 "react-dom": "^16.13.1",
138 "react-draft-wysiwyg": "^1.14.5",
139 "react-drag-listview": "^0.1.8",
140 "react-drawer": "^1.3.4",
141 "react-dropzone": "^11.2.4",
142 "react-dual-listbox": "^2.0.0",
143 "react-facebook-login": "^4.1.1",
144 "react-flatpickr": "^3.10.6",
145 "react-google-login": "^5.2.2",
146 "react-hook-form": "^7.15.2",
147 "react-i18next": "^11.8.5",
148 "react-icons": "^4.2.0",
149 "react-image-lightbox": "^5.1.1",
150 "react-input-mask": "^2.0.4",
151 "react-jvectormap": "^0.0.16",
152 "react-leaflet": "^3.0.5",
153 "react-meta-tags": "^1.0.1",
154 "react-modal-video": "^1.2.6",
155 "react-notifications": "^1.7.2",
156 "react-number-format": "^4.7.3",
157 "react-perfect-scrollbar": "^1.5.8",
158 "react-rangeslider": "^2.2.0",
159 "react-rating": "^2.0.5",
160 "react-rating-tooltip": "^1.1.6",
161 "react-redux": "^7.2.1",
162 "react-responsive-carousel": "^3.2.11",
163 "react-router-dom": "^5.2.0",
164 "react-script": "^2.0.5",
165 "react-scripts": "3.4.3",
166 "react-select": "^4.3.1",
167 "react-sparklines": "^1.7.0",
168 "react-star-ratings": "^2.3.0",
169 "react-super-responsive-table": "^5.2.0",
170 "react-switch": "^6.0.0",
171 "react-table": "^7.6.3",
172 "react-toastify": "^7.0.3",
173 "react-toastr": "^3.0.0",
174 "react-twitter-auth": "0.0.13",
175 "reactstrap": "^8.8.1",
176 "recharts": "^2.0.8",
177 "redux": "^4.0.5",
178 "redux-saga": "^1.1.3",
179 "reselect": "^4.0.0",
180 "sass": "^1.37.5",
181 "simplebar-react": "^2.3.0",
182 "styled": "^1.0.0",
183 "styled-components": "^5.2.1",
184 "toastr": "^2.1.4",
185 "typescript": "^4.0.2",
186 "universal-cookie": "^4.0.4"
187 },
188 "devDependencies": {
189 "@typescript-eslint/eslint-plugin": "^2.27.0",
190 "@typescript-eslint/parser": "^2.27.0",
191 "@typescript-eslint/typescript-estree": "^4.15.2",
192 "eslint-config-prettier": "^6.10.1",
193 "eslint-plugin-prettier": "^3.1.2",
194 "husky": "^4.2.5",
195 "lint-staged": "^10.1.3",
196 "prettier": "^1.19.1",
197 "react-test-renderer": "^16.13.1",
198 "redux-devtools-extension": "^2.13.8",
199 "redux-mock-store": "^1.5.4"
200 },
201 "scripts": {
202 "start": "react-scripts start",
203 "build": "react-scripts build && mv build ./deploy/build",
204 "build-local": "react-scripts build",
205 "test": "react-scripts test",
206 "eject": "react-scripts eject"
207 },
208 "eslintConfig": {
209 "extends": "react-app"
210 },
211 "husky": {
212 "hooks": {
213 "pre-commit": "lint-staged"
214 }
215 },
216 "lint-staged": {
217 "*.{js,ts,tsx}": [
218 "eslint --fix"
219 ]
220 },
221 "browserslist": {
222 "production": [
223 ">0.2%",
224 "not dead",
225 "not op_mini all"
226 ],
227 "development": [
228 "last 1 chrome version",
229 "last 1 firefox version",
230 "last 1 safari version"
231 ]
232 }
233}
234 - name: Fix up git URLs
235 run: echo -e '[url "https://github.com/"]\n insteadOf = "git://github.com/"' >> ~/.gitconfig
236git config --global url."https://github.com/".insteadOf git://github.com/
237
You can also use SSH, but GitHub Security reminds us that, as of March 15th, 2022, GitHub stopped accepting DSA keys. RSA keys uploaded after Nov 2, 2021 will work only with SHA-2 signatures.
The deprecated MACs, ciphers, and unencrypted Git protocol are permanently disabled.
So this (with the right key) would work:
1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error:
6 The unauthenticated git protocol on port 9418 is no longer supported.
7 - name: Installing modules
8 run: yarn install
9 steps:
10 - name: Checkout
11 uses: actions/checkout@v2
12
13 - id: vars
14 run: |
15 if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream" ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
16
17 - uses: pCYSl5EDgo/cat@master
18 id: slack
19 with:
20 path: .github/workflows/slack.txt
21
22 - name: Slack Start Notification
23 uses: 8398a7/action-slack@v3
24 env:
25 SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26 ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27 COLOR: good
28 STATUS: '`Started`'
29 with:
30 status: custom
31 fields: workflow,job,commit,repo,ref,author,took
32 custom_payload: |
33 ${{ steps.slack.outputs.text }}
34
35 - name: Installing modules
36 env:
37 REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38 run: yarn install
39
40 - name: Create Frontend Build
41 env:
42 REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43 run: yarn build
44
45 - name: Deploy to Frontend Server DEV
46 if: ${{ contains(github.ref, 'dev') }}
47 uses: easingthemes/ssh-deploy@v2.1.5
48 env:
49 SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50 ARGS: '-rltgoDzvO --delete'
51 SOURCE: 'deploy/'
52 REMOTE_HOST: ${{ secrets.DEV_HOST }}
53 REMOTE_USER: plyfolio-dev
54 TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55 {
56 "name": "stackstream-fe",
57 "version": "1.0.0",
58 "authors": [
59 "fayyaznofal@gmail.com"
60 ],
61 "private": true,
62 "dependencies": {
63 "@fortawesome/fontawesome-svg-core": "^1.2.34",
64 "@fortawesome/free-solid-svg-icons": "^5.15.2",
65 "@fortawesome/react-fontawesome": "^0.1.14",
66 "@fullcalendar/bootstrap": "^5.5.0",
67 "@fullcalendar/core": "^5.5.0",
68 "@fullcalendar/daygrid": "^5.5.0",
69 "@fullcalendar/interaction": "^5.5.0",
70 "@fullcalendar/react": "^5.5.0",
71 "@lourenci/react-kanban": "^2.1.0",
72 "@redux-saga/simple-saga-monitor": "^1.1.2",
73 "@testing-library/jest-dom": "^5.11.9",
74 "@testing-library/react": "^11.2.3",
75 "@testing-library/user-event": "^12.6.0",
76 "@toast-ui/react-chart": "^1.0.2",
77 "@types/jest": "^26.0.14",
78 "@types/node": "^14.10.3",
79 "@types/react": "^16.9.49",
80 "@types/react-dom": "^16.9.8",
81 "@vtaits/react-color-picker": "^0.1.1",
82 "apexcharts": "^3.23.1",
83 "availity-reactstrap-validation": "^2.7.0",
84 "axios": "^0.21.1",
85 "axios-mock-adapter": "^1.19.0",
86 "axios-progress-bar": "^1.2.0",
87 "bootstrap": "^5.0.0-beta2",
88 "chart.js": "^2.9.4",
89 "chartist": "^0.11.4",
90 "classnames": "^2.2.6",
91 "components": "^0.1.0",
92 "dotenv": "^8.2.0",
93 "draft-js": "^0.11.7",
94 "echarts": "^4.9.0",
95 "echarts-for-react": "^2.0.16",
96 "firebase": "^8.2.3",
97 "google-maps-react": "^2.0.6",
98 "history": "^4.10.1",
99 "i": "^0.3.6",
100 "i18next": "^19.8.4",
101 "i18next-browser-languagedetector": "^6.0.1",
102 "jsonwebtoken": "^8.5.1",
103 "leaflet": "^1.7.1",
104 "lodash": "^4.17.21",
105 "lodash.clonedeep": "^4.5.0",
106 "lodash.get": "^4.4.2",
107 "metismenujs": "^1.2.1",
108 "mkdirp": "^1.0.4",
109 "moment": "2.29.1",
110 "moment-timezone": "^0.5.32",
111 "nouislider-react": "^3.3.9",
112 "npm": "^7.6.3",
113 "prop-types": "^15.7.2",
114 "query-string": "^6.14.0",
115 "react": "^16.13.1",
116 "react-apexcharts": "^1.3.7",
117 "react-auth-code-input": "^1.0.0",
118 "react-avatar": "^3.10.0",
119 "react-bootstrap": "^1.5.0",
120 "react-bootstrap-editable": "^0.8.2",
121 "react-bootstrap-sweetalert": "^5.2.0",
122 "react-bootstrap-table-next": "^4.0.3",
123 "react-bootstrap-table2-editor": "^1.4.0",
124 "react-bootstrap-table2-paginator": "^2.1.2",
125 "react-bootstrap-table2-toolkit": "^2.1.3",
126 "react-chartist": "^0.14.3",
127 "react-chartjs-2": "^2.11.1",
128 "react-color": "^2.19.3",
129 "react-confirm-alert": "^2.7.0",
130 "react-content-loader": "^6.0.1",
131 "react-countdown": "^2.3.1",
132 "react-countup": "^4.3.3",
133 "react-cropper": "^2.1.4",
134 "react-data-table-component": "^6.11.8",
135 "react-date-picker": "^8.0.6",
136 "react-datepicker": "^3.4.1",
137 "react-dom": "^16.13.1",
138 "react-draft-wysiwyg": "^1.14.5",
139 "react-drag-listview": "^0.1.8",
140 "react-drawer": "^1.3.4",
141 "react-dropzone": "^11.2.4",
142 "react-dual-listbox": "^2.0.0",
143 "react-facebook-login": "^4.1.1",
144 "react-flatpickr": "^3.10.6",
145 "react-google-login": "^5.2.2",
146 "react-hook-form": "^7.15.2",
147 "react-i18next": "^11.8.5",
148 "react-icons": "^4.2.0",
149 "react-image-lightbox": "^5.1.1",
150 "react-input-mask": "^2.0.4",
151 "react-jvectormap": "^0.0.16",
152 "react-leaflet": "^3.0.5",
153 "react-meta-tags": "^1.0.1",
154 "react-modal-video": "^1.2.6",
155 "react-notifications": "^1.7.2",
156 "react-number-format": "^4.7.3",
157 "react-perfect-scrollbar": "^1.5.8",
158 "react-rangeslider": "^2.2.0",
159 "react-rating": "^2.0.5",
160 "react-rating-tooltip": "^1.1.6",
161 "react-redux": "^7.2.1",
162 "react-responsive-carousel": "^3.2.11",
163 "react-router-dom": "^5.2.0",
164 "react-script": "^2.0.5",
165 "react-scripts": "3.4.3",
166 "react-select": "^4.3.1",
167 "react-sparklines": "^1.7.0",
168 "react-star-ratings": "^2.3.0",
169 "react-super-responsive-table": "^5.2.0",
170 "react-switch": "^6.0.0",
171 "react-table": "^7.6.3",
172 "react-toastify": "^7.0.3",
173 "react-toastr": "^3.0.0",
174 "react-twitter-auth": "0.0.13",
175 "reactstrap": "^8.8.1",
176 "recharts": "^2.0.8",
177 "redux": "^4.0.5",
178 "redux-saga": "^1.1.3",
179 "reselect": "^4.0.0",
180 "sass": "^1.37.5",
181 "simplebar-react": "^2.3.0",
182 "styled": "^1.0.0",
183 "styled-components": "^5.2.1",
184 "toastr": "^2.1.4",
185 "typescript": "^4.0.2",
186 "universal-cookie": "^4.0.4"
187 },
188 "devDependencies": {
189 "@typescript-eslint/eslint-plugin": "^2.27.0",
190 "@typescript-eslint/parser": "^2.27.0",
191 "@typescript-eslint/typescript-estree": "^4.15.2",
192 "eslint-config-prettier": "^6.10.1",
193 "eslint-plugin-prettier": "^3.1.2",
194 "husky": "^4.2.5",
195 "lint-staged": "^10.1.3",
196 "prettier": "^1.19.1",
197 "react-test-renderer": "^16.13.1",
198 "redux-devtools-extension": "^2.13.8",
199 "redux-mock-store": "^1.5.4"
200 },
201 "scripts": {
202 "start": "react-scripts start",
203 "build": "react-scripts build && mv build ./deploy/build",
204 "build-local": "react-scripts build",
205 "test": "react-scripts test",
206 "eject": "react-scripts eject"
207 },
208 "eslintConfig": {
209 "extends": "react-app"
210 },
211 "husky": {
212 "hooks": {
213 "pre-commit": "lint-staged"
214 }
215 },
216 "lint-staged": {
217 "*.{js,ts,tsx}": [
218 "eslint --fix"
219 ]
220 },
221 "browserslist": {
222 "production": [
223 ">0.2%",
224 "not dead",
225 "not op_mini all"
226 ],
227 "development": [
228 "last 1 chrome version",
229 "last 1 firefox version",
230 "last 1 safari version"
231 ]
232 }
233}
234 - name: Fix up git URLs
235 run: echo -e '[url "https://github.com/"]\n insteadOf = "git://github.com/"' >> ~/.gitconfig
236git config --global url."https://github.com/".insteadOf git://github.com/
237git config --global url."git@github.com:".insteadOf git://github.com/
238
That will change any git://github.com/
(unencrypted Git protocol) into git@github.com:
(SSH URL).
QUESTION
Consider using the "jsdom" test environment
Asked 2022-Mar-23 at 20:23I have this simple test:
1import React from 'react'
2import { render } from '@testing-library/react'
3
4import Button from '.'
5
6describe('Button', () => {
7 it('renders button without crashing', () => {
8 const label = 'test'
9
10 render(<Button label={label} />)
11 })
12})
13
14
And I have a jest.config.json
with this content
1import React from 'react'
2import { render } from '@testing-library/react'
3
4import Button from '.'
5
6describe('Button', () => {
7 it('renders button without crashing', () => {
8 const label = 'test'
9
10 render(<Button label={label} />)
11 })
12})
13
14{
15 "setupFilesAfterEnv": [
16 "<rootDir>/lib/settings/setupTests.ts"
17 ]
18}
19
And on my setupTests.ts
I have
1import React from 'react'
2import { render } from '@testing-library/react'
3
4import Button from '.'
5
6describe('Button', () => {
7 it('renders button without crashing', () => {
8 const label = 'test'
9
10 render(<Button label={label} />)
11 })
12})
13
14{
15 "setupFilesAfterEnv": [
16 "<rootDir>/lib/settings/setupTests.ts"
17 ]
18}
19import '@testing-library/jest-dom'
20
When I run npm run test
(which just run jest
), I got the following error:
The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.
What I am doing wrong? This used to work before an upgrade.
ANSWER
Answered 2021-Oct-25 at 05:17In your package.json
, or jest.config.js
/jest.config.js
, change the value of the testEnvironment
property to jsdom
.
1import React from 'react'
2import { render } from '@testing-library/react'
3
4import Button from '.'
5
6describe('Button', () => {
7 it('renders button without crashing', () => {
8 const label = 'test'
9
10 render(<Button label={label} />)
11 })
12})
13
14{
15 "setupFilesAfterEnv": [
16 "<rootDir>/lib/settings/setupTests.ts"
17 ]
18}
19import '@testing-library/jest-dom'
20"jest":{
21 "testEnvironment": "jsdom"
22}
23
1import React from 'react'
2import { render } from '@testing-library/react'
3
4import Button from '.'
5
6describe('Button', () => {
7 it('renders button without crashing', () => {
8 const label = 'test'
9
10 render(<Button label={label} />)
11 })
12})
13
14{
15 "setupFilesAfterEnv": [
16 "<rootDir>/lib/settings/setupTests.ts"
17 ]
18}
19import '@testing-library/jest-dom'
20"jest":{
21 "testEnvironment": "jsdom"
22}
23{
24 "testEnvironment": "jsdom"
25}
26
By default, jest uses the node
testEnvironment. This essentially makes any tests meant for a browser environment invalid.
jsdom
is an implementation of a browser environment, which supports these types of UI tests.
QUESTION
Installing scipy and scikit-learn on apple m1
Asked 2022-Mar-22 at 06:21The installation on the m1 chip for the following packages: Numpy 1.21.1, pandas 1.3.0, torch 1.9.0 and a few other ones works fine for me. They also seem to work properly while testing them. However when I try to install scipy or scikit-learn via pip this error appears:
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
Why should Numpy be build again when I have the latest version from pip already installed?
Every previous installation was done using python3.9 -m pip install ...
on Mac OS 11.3.1 with the apple m1 chip.
Maybe somebody knows how to deal with this error or if its just a matter of time.
ANSWER
Answered 2021-Aug-02 at 14:33Please see this note of scikit-learn
about
Installing on Apple Silicon M1 hardware
The recently introduced
macos/arm64
platform (sometimes also known asmacos/aarch64
) requires the open source community to upgrade the build configuation and automation to properly support it.At the time of writing (January 2021), the only way to get a working installation of scikit-learn on this hardware is to install scikit-learn and its dependencies from the conda-forge distribution, for instance using the miniforge installers:
https://github.com/conda-forge/miniforge
The following issue tracks progress on making it possible to install scikit-learn from PyPI with pip:
QUESTION
TypeError: load() missing 1 required positional argument: 'Loader' in Google Colab
Asked 2022-Mar-04 at 11:01I am trying to do a regular import in Google Colab.
This import worked up until now.
If I try:
1import plotly.express as px
2
or
1import plotly.express as px
2import pingouin as pg
3
I get an error:
1import plotly.express as px
2import pingouin as pg
3---------------------------------------------------------------------------
4TypeError Traceback (most recent call last)
5<ipython-input-19-86e89bd44552> in <module>()
6----> 1 import plotly.express as px
7
89 frames
9/usr/local/lib/python3.7/dist-packages/plotly/express/__init__.py in <module>()
10 13 )
11 14
12---> 15 from ._imshow import imshow
13 16 from ._chart_types import ( # noqa: F401
14 17 scatter,
15
16/usr/local/lib/python3.7/dist-packages/plotly/express/_imshow.py in <module>()
17 9
18 10 try:
19---> 11 import xarray
20 12
21 13 xarray_imported = True
22
23/usr/local/lib/python3.7/dist-packages/xarray/__init__.py in <module>()
24 1 import pkg_resources
25 2
26----> 3 from . import testing, tutorial, ufuncs
27 4 from .backends.api import (
28 5 load_dataarray,
29
30/usr/local/lib/python3.7/dist-packages/xarray/tutorial.py in <module>()
31 11 import numpy as np
32 12
33---> 13 from .backends.api import open_dataset as _open_dataset
34 14 from .backends.rasterio_ import open_rasterio as _open_rasterio
35 15 from .core.dataarray import DataArray
36
37/usr/local/lib/python3.7/dist-packages/xarray/backends/__init__.py in <module>()
38 4 formats. They should not be used directly, but rather through Dataset objects.
39 5
40----> 6 from .cfgrib_ import CfGribDataStore
41 7 from .common import AbstractDataStore, BackendArray, BackendEntrypoint
42 8 from .file_manager import CachingFileManager, DummyFileManager, FileManager
43
44/usr/local/lib/python3.7/dist-packages/xarray/backends/cfgrib_.py in <module>()
45 14 _normalize_path,
46 15 )
47---> 16 from .locks import SerializableLock, ensure_lock
48 17 from .store import StoreBackendEntrypoint
49 18
50
51/usr/local/lib/python3.7/dist-packages/xarray/backends/locks.py in <module>()
52 11
53 12 try:
54---> 13 from dask.distributed import Lock as DistributedLock
55 14 except ImportError:
56 15 DistributedLock = None
57
58/usr/local/lib/python3.7/dist-packages/dask/distributed.py in <module>()
59 1 # flake8: noqa
60 2 try:
61----> 3 from distributed import *
62 4 except ImportError:
63 5 msg = (
64
65/usr/local/lib/python3.7/dist-packages/distributed/__init__.py in <module>()
66 1 from __future__ import print_function, division, absolute_import
67 2
68----> 3 from . import config
69 4 from dask.config import config
70 5 from .actor import Actor, ActorFuture
71
72/usr/local/lib/python3.7/dist-packages/distributed/config.py in <module>()
73 18
74 19 with open(fn) as f:
75---> 20 defaults = yaml.load(f)
76 21
77 22 dask.config.update_defaults(defaults)
78
79TypeError: load() missing 1 required positional argument: 'Loader'
80
I think it might be a problem with Google Colab or some basic utility package that has been updated, but I can not find a way to solve it.
ANSWER
Answered 2021-Oct-15 at 21:11Found the problem.
I was installing pandas_profiling
, and this package updated pyyaml
to version 6.0 which is not compatible with the current way Google Colab imports packages.
So just reverting back to pyyaml
version 5.4.1 solved the problem.
For more information check versions of pyyaml
here.
See this issue and formal answers in GitHub
##################################################################
For reverting back to pyyaml
version 5.4.1 in your code, add the next line at the end of your packages installations:
1import plotly.express as px
2import pingouin as pg
3---------------------------------------------------------------------------
4TypeError Traceback (most recent call last)
5<ipython-input-19-86e89bd44552> in <module>()
6----> 1 import plotly.express as px
7
89 frames
9/usr/local/lib/python3.7/dist-packages/plotly/express/__init__.py in <module>()
10 13 )
11 14
12---> 15 from ._imshow import imshow
13 16 from ._chart_types import ( # noqa: F401
14 17 scatter,
15
16/usr/local/lib/python3.7/dist-packages/plotly/express/_imshow.py in <module>()
17 9
18 10 try:
19---> 11 import xarray
20 12
21 13 xarray_imported = True
22
23/usr/local/lib/python3.7/dist-packages/xarray/__init__.py in <module>()
24 1 import pkg_resources
25 2
26----> 3 from . import testing, tutorial, ufuncs
27 4 from .backends.api import (
28 5 load_dataarray,
29
30/usr/local/lib/python3.7/dist-packages/xarray/tutorial.py in <module>()
31 11 import numpy as np
32 12
33---> 13 from .backends.api import open_dataset as _open_dataset
34 14 from .backends.rasterio_ import open_rasterio as _open_rasterio
35 15 from .core.dataarray import DataArray
36
37/usr/local/lib/python3.7/dist-packages/xarray/backends/__init__.py in <module>()
38 4 formats. They should not be used directly, but rather through Dataset objects.
39 5
40----> 6 from .cfgrib_ import CfGribDataStore
41 7 from .common import AbstractDataStore, BackendArray, BackendEntrypoint
42 8 from .file_manager import CachingFileManager, DummyFileManager, FileManager
43
44/usr/local/lib/python3.7/dist-packages/xarray/backends/cfgrib_.py in <module>()
45 14 _normalize_path,
46 15 )
47---> 16 from .locks import SerializableLock, ensure_lock
48 17 from .store import StoreBackendEntrypoint
49 18
50
51/usr/local/lib/python3.7/dist-packages/xarray/backends/locks.py in <module>()
52 11
53 12 try:
54---> 13 from dask.distributed import Lock as DistributedLock
55 14 except ImportError:
56 15 DistributedLock = None
57
58/usr/local/lib/python3.7/dist-packages/dask/distributed.py in <module>()
59 1 # flake8: noqa
60 2 try:
61----> 3 from distributed import *
62 4 except ImportError:
63 5 msg = (
64
65/usr/local/lib/python3.7/dist-packages/distributed/__init__.py in <module>()
66 1 from __future__ import print_function, division, absolute_import
67 2
68----> 3 from . import config
69 4 from dask.config import config
70 5 from .actor import Actor, ActorFuture
71
72/usr/local/lib/python3.7/dist-packages/distributed/config.py in <module>()
73 18
74 19 with open(fn) as f:
75---> 20 defaults = yaml.load(f)
76 21
77 22 dask.config.update_defaults(defaults)
78
79TypeError: load() missing 1 required positional argument: 'Loader'
80!pip install pyyaml==5.4.1
81
It is important to put it at the end of the installation, some of the installations will change the pyyaml
version.
QUESTION
Switch' is not exported from 'react-router-dom'
Asked 2022-Mar-01 at 09:07In package.json file react-router-dom dependencies added. App component wrapped by BrowswerRouter , but when I wrap route by switch it says the following error Switch' is not exported from 'react-router-dom'. I deleted the package.json.lock ,node modules, installed npm again and npm install @babel/core --save. Still not working. I successfully wasted 6 hour for this. Can you please help me to fix this? why it's not importing?
Index.js
1import {BrowserRouter} from 'react-router-dom';
2
3ReactDOM.render(
4 <BrowserRouter>
5 <App />
6 </BrowserRouter>,
7 document.getElementById('root')
8);
9
App.js:
1import {BrowserRouter} from 'react-router-dom';
2
3ReactDOM.render(
4 <BrowserRouter>
5 <App />
6 </BrowserRouter>,
7 document.getElementById('root')
8);
9 import logo from './logo.svg';
10import './App.css';
11import React from 'react';
12import {Switch,Route,Link} from 'react-router-dom';
13import Home from './Home';
14class App extends React.Component {
15 componentDidMount(){
16 alert('mounting');
17 }
18 componentDidUpdate(){
19 alert('updated');
20 }
21 render(){
22 return (
23
24 <div className="App">
25
26 <div>
27 <Link to="/">Home</Link>
28 </div>
29
30 <hr />
31
32 <Switch>
33 <Route exact path="/">
34 <Home/>
35 </Route>
36 </Switch>
37
38 </div>
39
40);
41 }
42}
43
44export default App;
45
46import React from 'react';
47
48 const Home = () => {
49 return <h1>Home</h1>;
50 };
51
52 export default Home;
53
package.json
1import {BrowserRouter} from 'react-router-dom';
2
3ReactDOM.render(
4 <BrowserRouter>
5 <App />
6 </BrowserRouter>,
7 document.getElementById('root')
8);
9 import logo from './logo.svg';
10import './App.css';
11import React from 'react';
12import {Switch,Route,Link} from 'react-router-dom';
13import Home from './Home';
14class App extends React.Component {
15 componentDidMount(){
16 alert('mounting');
17 }
18 componentDidUpdate(){
19 alert('updated');
20 }
21 render(){
22 return (
23
24 <div className="App">
25
26 <div>
27 <Link to="/">Home</Link>
28 </div>
29
30 <hr />
31
32 <Switch>
33 <Route exact path="/">
34 <Home/>
35 </Route>
36 </Switch>
37
38 </div>
39
40);
41 }
42}
43
44export default App;
45
46import React from 'react';
47
48 const Home = () => {
49 return <h1>Home</h1>;
50 };
51
52 export default Home;
53"dependencies": {
54 "@babel/core": "^7.16.0",
55 "@testing-library/jest-dom": "^5.11.4",
56 "@testing-library/react": "^11.1.0",
57 "@testing-library/user-event": "^12.1.10",
58 "react": "^17.0.2",
59 "react-dom": "^17.0.2",
60 "react-router": "^6.0.0",
61 "react-router-dom": "^6.0.0",
62 "react-scripts": "4.0.3",
63 "web-vitals": "^1.0.1"
64 },
65
ANSWER
Answered 2021-Nov-04 at 18:10Routes
instead of Switch
in react-router v6
You are using react-router-dom
version 6, which replaced Switch with the Routes component
1import {BrowserRouter} from 'react-router-dom';
2
3ReactDOM.render(
4 <BrowserRouter>
5 <App />
6 </BrowserRouter>,
7 document.getElementById('root')
8);
9 import logo from './logo.svg';
10import './App.css';
11import React from 'react';
12import {Switch,Route,Link} from 'react-router-dom';
13import Home from './Home';
14class App extends React.Component {
15 componentDidMount(){
16 alert('mounting');
17 }
18 componentDidUpdate(){
19 alert('updated');
20 }
21 render(){
22 return (
23
24 <div className="App">
25
26 <div>
27 <Link to="/">Home</Link>
28 </div>
29
30 <hr />
31
32 <Switch>
33 <Route exact path="/">
34 <Home/>
35 </Route>
36 </Switch>
37
38 </div>
39
40);
41 }
42}
43
44export default App;
45
46import React from 'react';
47
48 const Home = () => {
49 return <h1>Home</h1>;
50 };
51
52 export default Home;
53"dependencies": {
54 "@babel/core": "^7.16.0",
55 "@testing-library/jest-dom": "^5.11.4",
56 "@testing-library/react": "^11.1.0",
57 "@testing-library/user-event": "^12.1.10",
58 "react": "^17.0.2",
59 "react-dom": "^17.0.2",
60 "react-router": "^6.0.0",
61 "react-router-dom": "^6.0.0",
62 "react-scripts": "4.0.3",
63 "web-vitals": "^1.0.1"
64 },
65import {
66 BrowserRouter,
67 Routes, // instead of "Switch"
68 Route,
69} from "react-router-dom";
70
71// ...
72
73 <BrowserRouter>
74 <Routes>
75 <Route exact path="/" element={<Home />}>
76 <Home/>
77 </Route>
78 </Routes>
79 </BrowserRouter>
80
Note that you now also pass your component as the element
prop instead of using children.
QUESTION
IntelliJ - Git is not installed: Cannot identify version of git executable: no response
Asked 2022-Feb-14 at 04:51I'm using IntelliJ on my MacBook and get this message every time I open the app. I already checked the Preferences > Version Control > Git under "Path to Git executable" and set this path to the path that is shown in my terminal for "whereis git". Also, testing the path in the IntelliJ settings returns a "Git version is 2.30.1". What else can I do to fix this problem?
ANSWER
Answered 2021-Nov-15 at 07:23In my case the issue was solved by invalidating cache and restarting IDE. Simply go to Files -> Invalidate Caches -> Invalidate and Restart.
Community Discussions contain sources that include Stack Exchange Network
Tutorials and Learning Resources in Testing
Tutorials and Learning Resources are not available at this moment for Testing