Explore all Testing open source software, libraries, packages, source code, cloud functions and APIs.

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

jest

by facebook doticontypescriptdoticon

star image 38648 doticonMIT

Delightful JavaScript Testing.

cypress

by cypress-io doticonjavascriptdoticon

star image 38055 doticonMIT

Fast, easy and reliable testing for anything that runs in a browser.

javascript-testing-best-practices

by goldbergyoni doticonjavascriptdoticon

star image 16734 doticonMIT

📗🌐 🚢 Comprehensive and exhaustive JavaScript & Node.js testing best practices (April 2022)

react-testing-library

by testing-library doticonjavascriptdoticon

star image 16240 doticonMIT

🐐 Simple and complete React DOM testing utilities that encourage good testing practices.

chaosmonkey

by Netflix doticongodoticon

star image 10711 doticonApache-2.0

Chaos Monkey is a resiliency tool that helps applications tolerate random instance failures.

testcafe

by DevExpress doticonjavascriptdoticon

star image 9302 doticonMIT

A Node.js tool to automate end-to-end web testing.

oss-fuzz

by google doticonshelldoticon

star image 7257 doticonApache-2.0

OSS-Fuzz - continuous fuzzing for open source software.

metersphere

by metersphere doticonjavadoticon

star image 7173 doticonGPL-3.0

MeterSphere 是一站式开源持续测试平台,覆盖测试管理、接口测试、性能测试等。搞测试,就选 MeterSphere!

goconvey

by smartystreets doticongodoticon

star image 6617 doticonNOASSERTION

Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.

Trending New libraries in Testing

metersphere

by metersphere doticonjavadoticon

star image 7173 doticonGPL-3.0

MeterSphere 是一站式开源持续测试平台,覆盖测试管理、接口测试、性能测试等。搞测试,就选 MeterSphere!

playwright-python

by microsoft doticonpythondoticon

star image 6103 doticonApache-2.0

Python version of the Playwright testing and automation library.

hurl

by Orange-OpenSource doticonrustdoticon

star image 1326 doticonApache-2.0

Hurl, run and test HTTP requests with plain text.

atheris

by google doticonpythondoticon

star image 904 doticonApache-2.0

playbook-ios

by playbook-ui doticonswiftdoticon

star image 882 doticonApache-2.0

📘A library for isolated developing UI components and automatically taking snapshots of them.

testing-react

by storybookjs doticontypescriptdoticon

star image 539 doticonMIT

Testing utilities that allow you to reuse your Storybook stories in your React unit tests!

Jackalope

by googleprojectzero doticonc++doticon

star image 520 doticonApache-2.0

Binary, coverage-guided fuzzer for Windows and macOS

playwright-java

by microsoft doticonjavadoticon

star image 464 doticonApache-2.0

Java version of the Playwright testing and automation library

critic.sh

by Checksum doticonshelldoticon

star image 437 doticonMIT

Dead simple testing framework for Bash with coverage reporting

Top Authors in Testing

1

testing-library

14 Libraries

star icon25654

2

bahmutov

12 Libraries

star icon189

3

percy

11 Libraries

star icon555

4

google

11 Libraries

star icon15301

5

pact-foundation

11 Libraries

star icon2381

6

chaostoolkit-incubator

9 Libraries

star icon141

7

e2e-boilerplate

8 Libraries

star icon68

8

Ultimate-Hosts-Blacklist

8 Libraries

star icon31

9

microsoft

7 Libraries

star icon6641

10

fuzzitdev

7 Libraries

star icon983

1

14 Libraries

star icon25654

2

12 Libraries

star icon189

3

11 Libraries

star icon555

4

11 Libraries

star icon15301

5

11 Libraries

star icon2381

6

9 Libraries

star icon141

7

8 Libraries

star icon68

9

7 Libraries

star icon6641

10

7 Libraries

star icon983

Trending Kits in Testing

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.

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.

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.

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.

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.

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.

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.

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.

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.

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 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.

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.

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) variable 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

  1. Copy the code using the "Copy" button above, and paste it in a Python file in your IDE.
  2. 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.


  1. The solution is created in Python 3.7.15 version
  2. The solution is tested on sci-kit-learn 1.0.2 version
  3. 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

  1. For any support on kandi solution kits, please use the chat
  2. For further learning resources, visit the Open Weaver Community learning page.


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.

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.

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,

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.

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.

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.

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:41

I'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)

GitHub Issue Tracker

ANSWER

Answered 2022-Apr-04 at 18:41

To solve this on a Apple Silicon M1 I found three options

A

Use 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 enter image description here

B

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

enter image description here

C

convert your ndk-build into a cmake build

Source https://stackoverflow.com/questions/69541831

QUESTION

Constant FILTER_SANITIZE_STRING is deprecated

Asked 2022-Mar-30 at 13:01

I 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:59

This 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:

  1. 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 of FILTER_SANITIZE_STRING and you just want to use a default filter that will give you the string value.

  2. 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!

  3. 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|&lt;[^&gt;]*&gt;?/', '', $string);
5    return str_replace([&quot;'&quot;, '&quot;'], ['&amp;#39;', '&amp;#34;'], $str);
6}
7

Source https://stackoverflow.com/questions/69207368

QUESTION

Why is it faster to compare strings that match than strings that do not?

Asked 2022-Mar-30 at 11:58

Here are two measurements:

1timeit.timeit('&quot;toto&quot;==&quot;1234&quot;', number=100000000)
21.8320042459999968
3timeit.timeit('&quot;toto&quot;==&quot;toto&quot;', 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:57

Combining 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('&quot;toto&quot;==&quot;1234&quot;', number=100000000)
21.8320042459999968
3timeit.timeit('&quot;toto&quot;==&quot;toto&quot;', number=100000000)
41.4517491540000265
5import dis
6
7In [24]: dis.dis(&quot;'time'=='time'&quot;)
8  1           0 LOAD_CONST               0 ('time')  # &lt;-- same object (0)
9              2 LOAD_CONST               0 ('time')  # &lt;-- same object (0)
10              4 COMPARE_OP               2 (==)
11              6 RETURN_VALUE
12
13In [25]: dis.dis(&quot;'time'=='1234'&quot;)
14  1           0 LOAD_CONST               0 ('time')  # &lt;-- different object (0)
15              2 LOAD_CONST               1 ('1234')  # &lt;-- 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('&quot;toto&quot;==&quot;1234&quot;', number=100000000)
21.8320042459999968
3timeit.timeit('&quot;toto&quot;==&quot;toto&quot;', number=100000000)
41.4517491540000265
5import dis
6
7In [24]: dis.dis(&quot;'time'=='time'&quot;)
8  1           0 LOAD_CONST               0 ('time')  # &lt;-- same object (0)
9              2 LOAD_CONST               0 ('time')  # &lt;-- same object (0)
10              4 COMPARE_OP               2 (==)
11              6 RETURN_VALUE
12
13In [25]: dis.dis(&quot;'time'=='1234'&quot;)
14  1           0 LOAD_CONST               0 ('time')  # &lt;-- different object (0)
15              2 LOAD_CONST               1 ('1234')  # &lt;-- different object (1)
16              4 COMPARE_OP               2 (==)
17              6 RETURN_VALUE
18In [26]: timeit.timeit(&quot;x='time'; y='time'; x==y&quot;, number=1000000)
19Out[26]: 0.0745926329982467
20
21In [27]: timeit.timeit(&quot;x='time'; y='1234'; x==y&quot;, 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('&quot;toto&quot;==&quot;1234&quot;', number=100000000)
21.8320042459999968
3timeit.timeit('&quot;toto&quot;==&quot;toto&quot;', number=100000000)
41.4517491540000265
5import dis
6
7In [24]: dis.dis(&quot;'time'=='time'&quot;)
8  1           0 LOAD_CONST               0 ('time')  # &lt;-- same object (0)
9              2 LOAD_CONST               0 ('time')  # &lt;-- same object (0)
10              4 COMPARE_OP               2 (==)
11              6 RETURN_VALUE
12
13In [25]: dis.dis(&quot;'time'=='1234'&quot;)
14  1           0 LOAD_CONST               0 ('time')  # &lt;-- different object (0)
15              2 LOAD_CONST               1 ('1234')  # &lt;-- different object (1)
16              4 COMPARE_OP               2 (==)
17              6 RETURN_VALUE
18In [26]: timeit.timeit(&quot;x='time'; y='time'; x==y&quot;, number=1000000)
19Out[26]: 0.0745926329982467
20
21In [27]: timeit.timeit(&quot;x='time'; y='1234'; x==y&quot;, 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) {                  // &lt;-- 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

Source https://stackoverflow.com/questions/71644405

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:08

I 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  &quot;name&quot;: &quot;client&quot;,
3  &quot;version&quot;: &quot;0.1.0&quot;,
4  &quot;private&quot;: true, 
5  &quot;dependencies&quot;: {
6    &quot;@material-ui/core&quot;: &quot;^4.12.3&quot;,
7    &quot;@testing-library/jest-dom&quot;: &quot;^5.16.1&quot;,
8    &quot;@testing-library/react&quot;: &quot;^12.1.2&quot;,
9    &quot;@testing-library/user-event&quot;: &quot;^13.5.0&quot;,
10    &quot;axios&quot;: &quot;^0.24.0&quot;,
11    &quot;moment&quot;: &quot;^2.29.1&quot;,
12    &quot;react&quot;: &quot;^17.0.2&quot;,
13    &quot;react-dom&quot;: &quot;^17.0.2&quot;,
14    &quot;react-file-base64&quot;: &quot;^1.0.3&quot;,
15    &quot;react-redux&quot;: &quot;^7.2.6&quot;,
16    &quot;react-scripts&quot;: &quot;5.0.0&quot;,
17    &quot;redux&quot;: &quot;^4.1.2&quot;,
18    &quot;redux-thunk&quot;: &quot;^2.4.1&quot;,
19    &quot;web-vitals&quot;: &quot;^2.1.2&quot;
20  },
21  &quot;scripts&quot;: {
22    &quot;start&quot;: &quot;react-scripts start&quot;,
23    &quot;build&quot;: &quot;react-scripts build&quot;,
24    &quot;test&quot;: &quot;react-scripts test&quot;,
25    &quot;eject&quot;: &quot;react-scripts eject&quot;
26  },
27  &quot;eslintConfig&quot;: {
28    &quot;extends&quot;: [
29      &quot;react-app&quot;,
30      &quot;react-app/jest&quot;
31    ]
32  },
33  &quot;browserslist&quot;: {
34    &quot;production&quot;: [
35      &quot;&gt;0.2%&quot;,
36      &quot;not dead&quot;,
37      &quot;not op_mini all&quot;
38    ],
39    &quot;development&quot;: [
40      &quot;last 1 chrome version&quot;,
41      &quot;last 1 firefox version&quot;,
42      &quot;last 1 safari version&quot;
43    ]
44  },
45  &quot;proxy&quot;: &quot;http://localhost:6000&quot;
46}
47

ANSWER

Answered 2021-Dec-19 at 16:06

Here 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  &quot;name&quot;: &quot;client&quot;,
3  &quot;version&quot;: &quot;0.1.0&quot;,
4  &quot;private&quot;: true, 
5  &quot;dependencies&quot;: {
6    &quot;@material-ui/core&quot;: &quot;^4.12.3&quot;,
7    &quot;@testing-library/jest-dom&quot;: &quot;^5.16.1&quot;,
8    &quot;@testing-library/react&quot;: &quot;^12.1.2&quot;,
9    &quot;@testing-library/user-event&quot;: &quot;^13.5.0&quot;,
10    &quot;axios&quot;: &quot;^0.24.0&quot;,
11    &quot;moment&quot;: &quot;^2.29.1&quot;,
12    &quot;react&quot;: &quot;^17.0.2&quot;,
13    &quot;react-dom&quot;: &quot;^17.0.2&quot;,
14    &quot;react-file-base64&quot;: &quot;^1.0.3&quot;,
15    &quot;react-redux&quot;: &quot;^7.2.6&quot;,
16    &quot;react-scripts&quot;: &quot;5.0.0&quot;,
17    &quot;redux&quot;: &quot;^4.1.2&quot;,
18    &quot;redux-thunk&quot;: &quot;^2.4.1&quot;,
19    &quot;web-vitals&quot;: &quot;^2.1.2&quot;
20  },
21  &quot;scripts&quot;: {
22    &quot;start&quot;: &quot;react-scripts start&quot;,
23    &quot;build&quot;: &quot;react-scripts build&quot;,
24    &quot;test&quot;: &quot;react-scripts test&quot;,
25    &quot;eject&quot;: &quot;react-scripts eject&quot;
26  },
27  &quot;eslintConfig&quot;: {
28    &quot;extends&quot;: [
29      &quot;react-app&quot;,
30      &quot;react-app/jest&quot;
31    ]
32  },
33  &quot;browserslist&quot;: {
34    &quot;production&quot;: [
35      &quot;&gt;0.2%&quot;,
36      &quot;not dead&quot;,
37      &quot;not op_mini all&quot;
38    ],
39    &quot;development&quot;: [
40      &quot;last 1 chrome version&quot;,
41      &quot;last 1 firefox version&quot;,
42      &quot;last 1 safari version&quot;
43    ]
44  },
45  &quot;proxy&quot;: &quot;http://localhost:6000&quot;
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.

Source https://stackoverflow.com/questions/70374005

QUESTION

The unauthenticated git protocol on port 9418 is no longer supported

Asked 2022-Mar-27 at 13:23

I 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 &quot;::set-output name=environment::prod_stackstream&quot; ; echo &quot;::set-output name=api-url::api&quot; ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo &quot;::set-output name=environment::staging_stackstream&quot;  ; echo &quot;::set-output name=api-url::stagingapi&quot; ; else echo &quot;::set-output name=environment::dev_stackstream&quot; ; echo &quot;::set-output name=api-url::devapi&quot; ; 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 &quot;::set-output name=environment::prod_stackstream&quot; ; echo &quot;::set-output name=api-url::api&quot; ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo &quot;::set-output name=environment::staging_stackstream&quot;  ; echo &quot;::set-output name=api-url::stagingapi&quot; ; else echo &quot;::set-output name=environment::dev_stackstream&quot; ; echo &quot;::set-output name=api-url::devapi&quot; ; 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  &quot;name&quot;: &quot;stackstream-fe&quot;,
57  &quot;version&quot;: &quot;1.0.0&quot;,
58  &quot;authors&quot;: [
59    &quot;fayyaznofal@gmail.com&quot;
60  ],
61  &quot;private&quot;: true,
62  &quot;dependencies&quot;: {
63    &quot;@fortawesome/fontawesome-svg-core&quot;: &quot;^1.2.34&quot;,
64    &quot;@fortawesome/free-solid-svg-icons&quot;: &quot;^5.15.2&quot;,
65    &quot;@fortawesome/react-fontawesome&quot;: &quot;^0.1.14&quot;,
66    &quot;@fullcalendar/bootstrap&quot;: &quot;^5.5.0&quot;,
67    &quot;@fullcalendar/core&quot;: &quot;^5.5.0&quot;,
68    &quot;@fullcalendar/daygrid&quot;: &quot;^5.5.0&quot;,
69    &quot;@fullcalendar/interaction&quot;: &quot;^5.5.0&quot;,
70    &quot;@fullcalendar/react&quot;: &quot;^5.5.0&quot;,
71    &quot;@lourenci/react-kanban&quot;: &quot;^2.1.0&quot;,
72    &quot;@redux-saga/simple-saga-monitor&quot;: &quot;^1.1.2&quot;,
73    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.9&quot;,
74    &quot;@testing-library/react&quot;: &quot;^11.2.3&quot;,
75    &quot;@testing-library/user-event&quot;: &quot;^12.6.0&quot;,
76    &quot;@toast-ui/react-chart&quot;: &quot;^1.0.2&quot;,
77    &quot;@types/jest&quot;: &quot;^26.0.14&quot;,
78    &quot;@types/node&quot;: &quot;^14.10.3&quot;,
79    &quot;@types/react&quot;: &quot;^16.9.49&quot;,
80    &quot;@types/react-dom&quot;: &quot;^16.9.8&quot;,
81    &quot;@vtaits/react-color-picker&quot;: &quot;^0.1.1&quot;,
82    &quot;apexcharts&quot;: &quot;^3.23.1&quot;,
83    &quot;availity-reactstrap-validation&quot;: &quot;^2.7.0&quot;,
84    &quot;axios&quot;: &quot;^0.21.1&quot;,
85    &quot;axios-mock-adapter&quot;: &quot;^1.19.0&quot;,
86    &quot;axios-progress-bar&quot;: &quot;^1.2.0&quot;,
87    &quot;bootstrap&quot;: &quot;^5.0.0-beta2&quot;,
88    &quot;chart.js&quot;: &quot;^2.9.4&quot;,
89    &quot;chartist&quot;: &quot;^0.11.4&quot;,
90    &quot;classnames&quot;: &quot;^2.2.6&quot;,
91    &quot;components&quot;: &quot;^0.1.0&quot;,
92    &quot;dotenv&quot;: &quot;^8.2.0&quot;,
93    &quot;draft-js&quot;: &quot;^0.11.7&quot;,
94    &quot;echarts&quot;: &quot;^4.9.0&quot;,
95    &quot;echarts-for-react&quot;: &quot;^2.0.16&quot;,
96    &quot;firebase&quot;: &quot;^8.2.3&quot;,
97    &quot;google-maps-react&quot;: &quot;^2.0.6&quot;,
98    &quot;history&quot;: &quot;^4.10.1&quot;,
99    &quot;i&quot;: &quot;^0.3.6&quot;,
100    &quot;i18next&quot;: &quot;^19.8.4&quot;,
101    &quot;i18next-browser-languagedetector&quot;: &quot;^6.0.1&quot;,
102    &quot;jsonwebtoken&quot;: &quot;^8.5.1&quot;,
103    &quot;leaflet&quot;: &quot;^1.7.1&quot;,
104    &quot;lodash&quot;: &quot;^4.17.21&quot;,
105    &quot;lodash.clonedeep&quot;: &quot;^4.5.0&quot;,
106    &quot;lodash.get&quot;: &quot;^4.4.2&quot;,
107    &quot;metismenujs&quot;: &quot;^1.2.1&quot;,
108    &quot;mkdirp&quot;: &quot;^1.0.4&quot;,
109    &quot;moment&quot;: &quot;2.29.1&quot;,
110    &quot;moment-timezone&quot;: &quot;^0.5.32&quot;,
111    &quot;nouislider-react&quot;: &quot;^3.3.9&quot;,
112    &quot;npm&quot;: &quot;^7.6.3&quot;,
113    &quot;prop-types&quot;: &quot;^15.7.2&quot;,
114    &quot;query-string&quot;: &quot;^6.14.0&quot;,
115    &quot;react&quot;: &quot;^16.13.1&quot;,
116    &quot;react-apexcharts&quot;: &quot;^1.3.7&quot;,
117    &quot;react-auth-code-input&quot;: &quot;^1.0.0&quot;,
118    &quot;react-avatar&quot;: &quot;^3.10.0&quot;,
119    &quot;react-bootstrap&quot;: &quot;^1.5.0&quot;,
120    &quot;react-bootstrap-editable&quot;: &quot;^0.8.2&quot;,
121    &quot;react-bootstrap-sweetalert&quot;: &quot;^5.2.0&quot;,
122    &quot;react-bootstrap-table-next&quot;: &quot;^4.0.3&quot;,
123    &quot;react-bootstrap-table2-editor&quot;: &quot;^1.4.0&quot;,
124    &quot;react-bootstrap-table2-paginator&quot;: &quot;^2.1.2&quot;,
125    &quot;react-bootstrap-table2-toolkit&quot;: &quot;^2.1.3&quot;,
126    &quot;react-chartist&quot;: &quot;^0.14.3&quot;,
127    &quot;react-chartjs-2&quot;: &quot;^2.11.1&quot;,
128    &quot;react-color&quot;: &quot;^2.19.3&quot;,
129    &quot;react-confirm-alert&quot;: &quot;^2.7.0&quot;,
130    &quot;react-content-loader&quot;: &quot;^6.0.1&quot;,
131    &quot;react-countdown&quot;: &quot;^2.3.1&quot;,
132    &quot;react-countup&quot;: &quot;^4.3.3&quot;,
133    &quot;react-cropper&quot;: &quot;^2.1.4&quot;,
134    &quot;react-data-table-component&quot;: &quot;^6.11.8&quot;,
135    &quot;react-date-picker&quot;: &quot;^8.0.6&quot;,
136    &quot;react-datepicker&quot;: &quot;^3.4.1&quot;,
137    &quot;react-dom&quot;: &quot;^16.13.1&quot;,
138    &quot;react-draft-wysiwyg&quot;: &quot;^1.14.5&quot;,
139    &quot;react-drag-listview&quot;: &quot;^0.1.8&quot;,
140    &quot;react-drawer&quot;: &quot;^1.3.4&quot;,
141    &quot;react-dropzone&quot;: &quot;^11.2.4&quot;,
142    &quot;react-dual-listbox&quot;: &quot;^2.0.0&quot;,
143    &quot;react-facebook-login&quot;: &quot;^4.1.1&quot;,
144    &quot;react-flatpickr&quot;: &quot;^3.10.6&quot;,
145    &quot;react-google-login&quot;: &quot;^5.2.2&quot;,
146    &quot;react-hook-form&quot;: &quot;^7.15.2&quot;,
147    &quot;react-i18next&quot;: &quot;^11.8.5&quot;,
148    &quot;react-icons&quot;: &quot;^4.2.0&quot;,
149    &quot;react-image-lightbox&quot;: &quot;^5.1.1&quot;,
150    &quot;react-input-mask&quot;: &quot;^2.0.4&quot;,
151    &quot;react-jvectormap&quot;: &quot;^0.0.16&quot;,
152    &quot;react-leaflet&quot;: &quot;^3.0.5&quot;,
153    &quot;react-meta-tags&quot;: &quot;^1.0.1&quot;,
154    &quot;react-modal-video&quot;: &quot;^1.2.6&quot;,
155    &quot;react-notifications&quot;: &quot;^1.7.2&quot;,
156    &quot;react-number-format&quot;: &quot;^4.7.3&quot;,
157    &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,
158    &quot;react-rangeslider&quot;: &quot;^2.2.0&quot;,
159    &quot;react-rating&quot;: &quot;^2.0.5&quot;,
160    &quot;react-rating-tooltip&quot;: &quot;^1.1.6&quot;,
161    &quot;react-redux&quot;: &quot;^7.2.1&quot;,
162    &quot;react-responsive-carousel&quot;: &quot;^3.2.11&quot;,
163    &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
164    &quot;react-script&quot;: &quot;^2.0.5&quot;,
165    &quot;react-scripts&quot;: &quot;3.4.3&quot;,
166    &quot;react-select&quot;: &quot;^4.3.1&quot;,
167    &quot;react-sparklines&quot;: &quot;^1.7.0&quot;,
168    &quot;react-star-ratings&quot;: &quot;^2.3.0&quot;,
169    &quot;react-super-responsive-table&quot;: &quot;^5.2.0&quot;,
170    &quot;react-switch&quot;: &quot;^6.0.0&quot;,
171    &quot;react-table&quot;: &quot;^7.6.3&quot;,
172    &quot;react-toastify&quot;: &quot;^7.0.3&quot;,
173    &quot;react-toastr&quot;: &quot;^3.0.0&quot;,
174    &quot;react-twitter-auth&quot;: &quot;0.0.13&quot;,
175    &quot;reactstrap&quot;: &quot;^8.8.1&quot;,
176    &quot;recharts&quot;: &quot;^2.0.8&quot;,
177    &quot;redux&quot;: &quot;^4.0.5&quot;,
178    &quot;redux-saga&quot;: &quot;^1.1.3&quot;,
179    &quot;reselect&quot;: &quot;^4.0.0&quot;,
180    &quot;sass&quot;: &quot;^1.37.5&quot;,
181    &quot;simplebar-react&quot;: &quot;^2.3.0&quot;,
182    &quot;styled&quot;: &quot;^1.0.0&quot;,
183    &quot;styled-components&quot;: &quot;^5.2.1&quot;,
184    &quot;toastr&quot;: &quot;^2.1.4&quot;,
185    &quot;typescript&quot;: &quot;^4.0.2&quot;,
186    &quot;universal-cookie&quot;: &quot;^4.0.4&quot;
187  },
188  &quot;devDependencies&quot;: {
189    &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^2.27.0&quot;,
190    &quot;@typescript-eslint/parser&quot;: &quot;^2.27.0&quot;,
191    &quot;@typescript-eslint/typescript-estree&quot;: &quot;^4.15.2&quot;,
192    &quot;eslint-config-prettier&quot;: &quot;^6.10.1&quot;,
193    &quot;eslint-plugin-prettier&quot;: &quot;^3.1.2&quot;,
194    &quot;husky&quot;: &quot;^4.2.5&quot;,
195    &quot;lint-staged&quot;: &quot;^10.1.3&quot;,
196    &quot;prettier&quot;: &quot;^1.19.1&quot;,
197    &quot;react-test-renderer&quot;: &quot;^16.13.1&quot;,
198    &quot;redux-devtools-extension&quot;: &quot;^2.13.8&quot;,
199    &quot;redux-mock-store&quot;: &quot;^1.5.4&quot;
200  },
201  &quot;scripts&quot;: {
202    &quot;start&quot;: &quot;react-scripts start&quot;,
203    &quot;build&quot;: &quot;react-scripts build &amp;&amp; mv build ./deploy/build&quot;,
204    &quot;build-local&quot;: &quot;react-scripts build&quot;,
205    &quot;test&quot;: &quot;react-scripts test&quot;,
206    &quot;eject&quot;: &quot;react-scripts eject&quot;
207  },
208  &quot;eslintConfig&quot;: {
209    &quot;extends&quot;: &quot;react-app&quot;
210  },
211  &quot;husky&quot;: {
212    &quot;hooks&quot;: {
213      &quot;pre-commit&quot;: &quot;lint-staged&quot;
214    }
215  },
216  &quot;lint-staged&quot;: {
217    &quot;*.{js,ts,tsx}&quot;: [
218      &quot;eslint --fix&quot;
219    ]
220  },
221  &quot;browserslist&quot;: {
222    &quot;production&quot;: [
223      &quot;&gt;0.2%&quot;,
224      &quot;not dead&quot;,
225      &quot;not op_mini all&quot;
226    ],
227    &quot;development&quot;: [
228      &quot;last 1 chrome version&quot;,
229      &quot;last 1 firefox version&quot;,
230      &quot;last 1 safari version&quot;
231    ]
232  }
233}
234

ANSWER

Answered 2022-Mar-16 at 07:01

First, 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 &quot;::set-output name=environment::prod_stackstream&quot; ; echo &quot;::set-output name=api-url::api&quot; ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo &quot;::set-output name=environment::staging_stackstream&quot;  ; echo &quot;::set-output name=api-url::stagingapi&quot; ; else echo &quot;::set-output name=environment::dev_stackstream&quot; ; echo &quot;::set-output name=api-url::devapi&quot; ; 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  &quot;name&quot;: &quot;stackstream-fe&quot;,
57  &quot;version&quot;: &quot;1.0.0&quot;,
58  &quot;authors&quot;: [
59    &quot;fayyaznofal@gmail.com&quot;
60  ],
61  &quot;private&quot;: true,
62  &quot;dependencies&quot;: {
63    &quot;@fortawesome/fontawesome-svg-core&quot;: &quot;^1.2.34&quot;,
64    &quot;@fortawesome/free-solid-svg-icons&quot;: &quot;^5.15.2&quot;,
65    &quot;@fortawesome/react-fontawesome&quot;: &quot;^0.1.14&quot;,
66    &quot;@fullcalendar/bootstrap&quot;: &quot;^5.5.0&quot;,
67    &quot;@fullcalendar/core&quot;: &quot;^5.5.0&quot;,
68    &quot;@fullcalendar/daygrid&quot;: &quot;^5.5.0&quot;,
69    &quot;@fullcalendar/interaction&quot;: &quot;^5.5.0&quot;,
70    &quot;@fullcalendar/react&quot;: &quot;^5.5.0&quot;,
71    &quot;@lourenci/react-kanban&quot;: &quot;^2.1.0&quot;,
72    &quot;@redux-saga/simple-saga-monitor&quot;: &quot;^1.1.2&quot;,
73    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.9&quot;,
74    &quot;@testing-library/react&quot;: &quot;^11.2.3&quot;,
75    &quot;@testing-library/user-event&quot;: &quot;^12.6.0&quot;,
76    &quot;@toast-ui/react-chart&quot;: &quot;^1.0.2&quot;,
77    &quot;@types/jest&quot;: &quot;^26.0.14&quot;,
78    &quot;@types/node&quot;: &quot;^14.10.3&quot;,
79    &quot;@types/react&quot;: &quot;^16.9.49&quot;,
80    &quot;@types/react-dom&quot;: &quot;^16.9.8&quot;,
81    &quot;@vtaits/react-color-picker&quot;: &quot;^0.1.1&quot;,
82    &quot;apexcharts&quot;: &quot;^3.23.1&quot;,
83    &quot;availity-reactstrap-validation&quot;: &quot;^2.7.0&quot;,
84    &quot;axios&quot;: &quot;^0.21.1&quot;,
85    &quot;axios-mock-adapter&quot;: &quot;^1.19.0&quot;,
86    &quot;axios-progress-bar&quot;: &quot;^1.2.0&quot;,
87    &quot;bootstrap&quot;: &quot;^5.0.0-beta2&quot;,
88    &quot;chart.js&quot;: &quot;^2.9.4&quot;,
89    &quot;chartist&quot;: &quot;^0.11.4&quot;,
90    &quot;classnames&quot;: &quot;^2.2.6&quot;,
91    &quot;components&quot;: &quot;^0.1.0&quot;,
92    &quot;dotenv&quot;: &quot;^8.2.0&quot;,
93    &quot;draft-js&quot;: &quot;^0.11.7&quot;,
94    &quot;echarts&quot;: &quot;^4.9.0&quot;,
95    &quot;echarts-for-react&quot;: &quot;^2.0.16&quot;,
96    &quot;firebase&quot;: &quot;^8.2.3&quot;,
97    &quot;google-maps-react&quot;: &quot;^2.0.6&quot;,
98    &quot;history&quot;: &quot;^4.10.1&quot;,
99    &quot;i&quot;: &quot;^0.3.6&quot;,
100    &quot;i18next&quot;: &quot;^19.8.4&quot;,
101    &quot;i18next-browser-languagedetector&quot;: &quot;^6.0.1&quot;,
102    &quot;jsonwebtoken&quot;: &quot;^8.5.1&quot;,
103    &quot;leaflet&quot;: &quot;^1.7.1&quot;,
104    &quot;lodash&quot;: &quot;^4.17.21&quot;,
105    &quot;lodash.clonedeep&quot;: &quot;^4.5.0&quot;,
106    &quot;lodash.get&quot;: &quot;^4.4.2&quot;,
107    &quot;metismenujs&quot;: &quot;^1.2.1&quot;,
108    &quot;mkdirp&quot;: &quot;^1.0.4&quot;,
109    &quot;moment&quot;: &quot;2.29.1&quot;,
110    &quot;moment-timezone&quot;: &quot;^0.5.32&quot;,
111    &quot;nouislider-react&quot;: &quot;^3.3.9&quot;,
112    &quot;npm&quot;: &quot;^7.6.3&quot;,
113    &quot;prop-types&quot;: &quot;^15.7.2&quot;,
114    &quot;query-string&quot;: &quot;^6.14.0&quot;,
115    &quot;react&quot;: &quot;^16.13.1&quot;,
116    &quot;react-apexcharts&quot;: &quot;^1.3.7&quot;,
117    &quot;react-auth-code-input&quot;: &quot;^1.0.0&quot;,
118    &quot;react-avatar&quot;: &quot;^3.10.0&quot;,
119    &quot;react-bootstrap&quot;: &quot;^1.5.0&quot;,
120    &quot;react-bootstrap-editable&quot;: &quot;^0.8.2&quot;,
121    &quot;react-bootstrap-sweetalert&quot;: &quot;^5.2.0&quot;,
122    &quot;react-bootstrap-table-next&quot;: &quot;^4.0.3&quot;,
123    &quot;react-bootstrap-table2-editor&quot;: &quot;^1.4.0&quot;,
124    &quot;react-bootstrap-table2-paginator&quot;: &quot;^2.1.2&quot;,
125    &quot;react-bootstrap-table2-toolkit&quot;: &quot;^2.1.3&quot;,
126    &quot;react-chartist&quot;: &quot;^0.14.3&quot;,
127    &quot;react-chartjs-2&quot;: &quot;^2.11.1&quot;,
128    &quot;react-color&quot;: &quot;^2.19.3&quot;,
129    &quot;react-confirm-alert&quot;: &quot;^2.7.0&quot;,
130    &quot;react-content-loader&quot;: &quot;^6.0.1&quot;,
131    &quot;react-countdown&quot;: &quot;^2.3.1&quot;,
132    &quot;react-countup&quot;: &quot;^4.3.3&quot;,
133    &quot;react-cropper&quot;: &quot;^2.1.4&quot;,
134    &quot;react-data-table-component&quot;: &quot;^6.11.8&quot;,
135    &quot;react-date-picker&quot;: &quot;^8.0.6&quot;,
136    &quot;react-datepicker&quot;: &quot;^3.4.1&quot;,
137    &quot;react-dom&quot;: &quot;^16.13.1&quot;,
138    &quot;react-draft-wysiwyg&quot;: &quot;^1.14.5&quot;,
139    &quot;react-drag-listview&quot;: &quot;^0.1.8&quot;,
140    &quot;react-drawer&quot;: &quot;^1.3.4&quot;,
141    &quot;react-dropzone&quot;: &quot;^11.2.4&quot;,
142    &quot;react-dual-listbox&quot;: &quot;^2.0.0&quot;,
143    &quot;react-facebook-login&quot;: &quot;^4.1.1&quot;,
144    &quot;react-flatpickr&quot;: &quot;^3.10.6&quot;,
145    &quot;react-google-login&quot;: &quot;^5.2.2&quot;,
146    &quot;react-hook-form&quot;: &quot;^7.15.2&quot;,
147    &quot;react-i18next&quot;: &quot;^11.8.5&quot;,
148    &quot;react-icons&quot;: &quot;^4.2.0&quot;,
149    &quot;react-image-lightbox&quot;: &quot;^5.1.1&quot;,
150    &quot;react-input-mask&quot;: &quot;^2.0.4&quot;,
151    &quot;react-jvectormap&quot;: &quot;^0.0.16&quot;,
152    &quot;react-leaflet&quot;: &quot;^3.0.5&quot;,
153    &quot;react-meta-tags&quot;: &quot;^1.0.1&quot;,
154    &quot;react-modal-video&quot;: &quot;^1.2.6&quot;,
155    &quot;react-notifications&quot;: &quot;^1.7.2&quot;,
156    &quot;react-number-format&quot;: &quot;^4.7.3&quot;,
157    &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,
158    &quot;react-rangeslider&quot;: &quot;^2.2.0&quot;,
159    &quot;react-rating&quot;: &quot;^2.0.5&quot;,
160    &quot;react-rating-tooltip&quot;: &quot;^1.1.6&quot;,
161    &quot;react-redux&quot;: &quot;^7.2.1&quot;,
162    &quot;react-responsive-carousel&quot;: &quot;^3.2.11&quot;,
163    &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
164    &quot;react-script&quot;: &quot;^2.0.5&quot;,
165    &quot;react-scripts&quot;: &quot;3.4.3&quot;,
166    &quot;react-select&quot;: &quot;^4.3.1&quot;,
167    &quot;react-sparklines&quot;: &quot;^1.7.0&quot;,
168    &quot;react-star-ratings&quot;: &quot;^2.3.0&quot;,
169    &quot;react-super-responsive-table&quot;: &quot;^5.2.0&quot;,
170    &quot;react-switch&quot;: &quot;^6.0.0&quot;,
171    &quot;react-table&quot;: &quot;^7.6.3&quot;,
172    &quot;react-toastify&quot;: &quot;^7.0.3&quot;,
173    &quot;react-toastr&quot;: &quot;^3.0.0&quot;,
174    &quot;react-twitter-auth&quot;: &quot;0.0.13&quot;,
175    &quot;reactstrap&quot;: &quot;^8.8.1&quot;,
176    &quot;recharts&quot;: &quot;^2.0.8&quot;,
177    &quot;redux&quot;: &quot;^4.0.5&quot;,
178    &quot;redux-saga&quot;: &quot;^1.1.3&quot;,
179    &quot;reselect&quot;: &quot;^4.0.0&quot;,
180    &quot;sass&quot;: &quot;^1.37.5&quot;,
181    &quot;simplebar-react&quot;: &quot;^2.3.0&quot;,
182    &quot;styled&quot;: &quot;^1.0.0&quot;,
183    &quot;styled-components&quot;: &quot;^5.2.1&quot;,
184    &quot;toastr&quot;: &quot;^2.1.4&quot;,
185    &quot;typescript&quot;: &quot;^4.0.2&quot;,
186    &quot;universal-cookie&quot;: &quot;^4.0.4&quot;
187  },
188  &quot;devDependencies&quot;: {
189    &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^2.27.0&quot;,
190    &quot;@typescript-eslint/parser&quot;: &quot;^2.27.0&quot;,
191    &quot;@typescript-eslint/typescript-estree&quot;: &quot;^4.15.2&quot;,
192    &quot;eslint-config-prettier&quot;: &quot;^6.10.1&quot;,
193    &quot;eslint-plugin-prettier&quot;: &quot;^3.1.2&quot;,
194    &quot;husky&quot;: &quot;^4.2.5&quot;,
195    &quot;lint-staged&quot;: &quot;^10.1.3&quot;,
196    &quot;prettier&quot;: &quot;^1.19.1&quot;,
197    &quot;react-test-renderer&quot;: &quot;^16.13.1&quot;,
198    &quot;redux-devtools-extension&quot;: &quot;^2.13.8&quot;,
199    &quot;redux-mock-store&quot;: &quot;^1.5.4&quot;
200  },
201  &quot;scripts&quot;: {
202    &quot;start&quot;: &quot;react-scripts start&quot;,
203    &quot;build&quot;: &quot;react-scripts build &amp;&amp; mv build ./deploy/build&quot;,
204    &quot;build-local&quot;: &quot;react-scripts build&quot;,
205    &quot;test&quot;: &quot;react-scripts test&quot;,
206    &quot;eject&quot;: &quot;react-scripts eject&quot;
207  },
208  &quot;eslintConfig&quot;: {
209    &quot;extends&quot;: &quot;react-app&quot;
210  },
211  &quot;husky&quot;: {
212    &quot;hooks&quot;: {
213      &quot;pre-commit&quot;: &quot;lint-staged&quot;
214    }
215  },
216  &quot;lint-staged&quot;: {
217    &quot;*.{js,ts,tsx}&quot;: [
218      &quot;eslint --fix&quot;
219    ]
220  },
221  &quot;browserslist&quot;: {
222    &quot;production&quot;: [
223      &quot;&gt;0.2%&quot;,
224      &quot;not dead&quot;,
225      &quot;not op_mini all&quot;
226    ],
227    &quot;development&quot;: [
228      &quot;last 1 chrome version&quot;,
229      &quot;last 1 firefox version&quot;,
230      &quot;last 1 safari version&quot;
231    ]
232  }
233}
234    - name: Fix up git URLs
235      run: echo -e '[url &quot;https://github.com/&quot;]\n  insteadOf = &quot;git://github.com/&quot;' &gt;&gt; ~/.gitconfig
236

That will change any git://github.com/ into https://github.com/.

For local projects

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 &quot;::set-output name=environment::prod_stackstream&quot; ; echo &quot;::set-output name=api-url::api&quot; ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo &quot;::set-output name=environment::staging_stackstream&quot;  ; echo &quot;::set-output name=api-url::stagingapi&quot; ; else echo &quot;::set-output name=environment::dev_stackstream&quot; ; echo &quot;::set-output name=api-url::devapi&quot; ; 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  &quot;name&quot;: &quot;stackstream-fe&quot;,
57  &quot;version&quot;: &quot;1.0.0&quot;,
58  &quot;authors&quot;: [
59    &quot;fayyaznofal@gmail.com&quot;
60  ],
61  &quot;private&quot;: true,
62  &quot;dependencies&quot;: {
63    &quot;@fortawesome/fontawesome-svg-core&quot;: &quot;^1.2.34&quot;,
64    &quot;@fortawesome/free-solid-svg-icons&quot;: &quot;^5.15.2&quot;,
65    &quot;@fortawesome/react-fontawesome&quot;: &quot;^0.1.14&quot;,
66    &quot;@fullcalendar/bootstrap&quot;: &quot;^5.5.0&quot;,
67    &quot;@fullcalendar/core&quot;: &quot;^5.5.0&quot;,
68    &quot;@fullcalendar/daygrid&quot;: &quot;^5.5.0&quot;,
69    &quot;@fullcalendar/interaction&quot;: &quot;^5.5.0&quot;,
70    &quot;@fullcalendar/react&quot;: &quot;^5.5.0&quot;,
71    &quot;@lourenci/react-kanban&quot;: &quot;^2.1.0&quot;,
72    &quot;@redux-saga/simple-saga-monitor&quot;: &quot;^1.1.2&quot;,
73    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.9&quot;,
74    &quot;@testing-library/react&quot;: &quot;^11.2.3&quot;,
75    &quot;@testing-library/user-event&quot;: &quot;^12.6.0&quot;,
76    &quot;@toast-ui/react-chart&quot;: &quot;^1.0.2&quot;,
77    &quot;@types/jest&quot;: &quot;^26.0.14&quot;,
78    &quot;@types/node&quot;: &quot;^14.10.3&quot;,
79    &quot;@types/react&quot;: &quot;^16.9.49&quot;,
80    &quot;@types/react-dom&quot;: &quot;^16.9.8&quot;,
81    &quot;@vtaits/react-color-picker&quot;: &quot;^0.1.1&quot;,
82    &quot;apexcharts&quot;: &quot;^3.23.1&quot;,
83    &quot;availity-reactstrap-validation&quot;: &quot;^2.7.0&quot;,
84    &quot;axios&quot;: &quot;^0.21.1&quot;,
85    &quot;axios-mock-adapter&quot;: &quot;^1.19.0&quot;,
86    &quot;axios-progress-bar&quot;: &quot;^1.2.0&quot;,
87    &quot;bootstrap&quot;: &quot;^5.0.0-beta2&quot;,
88    &quot;chart.js&quot;: &quot;^2.9.4&quot;,
89    &quot;chartist&quot;: &quot;^0.11.4&quot;,
90    &quot;classnames&quot;: &quot;^2.2.6&quot;,
91    &quot;components&quot;: &quot;^0.1.0&quot;,
92    &quot;dotenv&quot;: &quot;^8.2.0&quot;,
93    &quot;draft-js&quot;: &quot;^0.11.7&quot;,
94    &quot;echarts&quot;: &quot;^4.9.0&quot;,
95    &quot;echarts-for-react&quot;: &quot;^2.0.16&quot;,
96    &quot;firebase&quot;: &quot;^8.2.3&quot;,
97    &quot;google-maps-react&quot;: &quot;^2.0.6&quot;,
98    &quot;history&quot;: &quot;^4.10.1&quot;,
99    &quot;i&quot;: &quot;^0.3.6&quot;,
100    &quot;i18next&quot;: &quot;^19.8.4&quot;,
101    &quot;i18next-browser-languagedetector&quot;: &quot;^6.0.1&quot;,
102    &quot;jsonwebtoken&quot;: &quot;^8.5.1&quot;,
103    &quot;leaflet&quot;: &quot;^1.7.1&quot;,
104    &quot;lodash&quot;: &quot;^4.17.21&quot;,
105    &quot;lodash.clonedeep&quot;: &quot;^4.5.0&quot;,
106    &quot;lodash.get&quot;: &quot;^4.4.2&quot;,
107    &quot;metismenujs&quot;: &quot;^1.2.1&quot;,
108    &quot;mkdirp&quot;: &quot;^1.0.4&quot;,
109    &quot;moment&quot;: &quot;2.29.1&quot;,
110    &quot;moment-timezone&quot;: &quot;^0.5.32&quot;,
111    &quot;nouislider-react&quot;: &quot;^3.3.9&quot;,
112    &quot;npm&quot;: &quot;^7.6.3&quot;,
113    &quot;prop-types&quot;: &quot;^15.7.2&quot;,
114    &quot;query-string&quot;: &quot;^6.14.0&quot;,
115    &quot;react&quot;: &quot;^16.13.1&quot;,
116    &quot;react-apexcharts&quot;: &quot;^1.3.7&quot;,
117    &quot;react-auth-code-input&quot;: &quot;^1.0.0&quot;,
118    &quot;react-avatar&quot;: &quot;^3.10.0&quot;,
119    &quot;react-bootstrap&quot;: &quot;^1.5.0&quot;,
120    &quot;react-bootstrap-editable&quot;: &quot;^0.8.2&quot;,
121    &quot;react-bootstrap-sweetalert&quot;: &quot;^5.2.0&quot;,
122    &quot;react-bootstrap-table-next&quot;: &quot;^4.0.3&quot;,
123    &quot;react-bootstrap-table2-editor&quot;: &quot;^1.4.0&quot;,
124    &quot;react-bootstrap-table2-paginator&quot;: &quot;^2.1.2&quot;,
125    &quot;react-bootstrap-table2-toolkit&quot;: &quot;^2.1.3&quot;,
126    &quot;react-chartist&quot;: &quot;^0.14.3&quot;,
127    &quot;react-chartjs-2&quot;: &quot;^2.11.1&quot;,
128    &quot;react-color&quot;: &quot;^2.19.3&quot;,
129    &quot;react-confirm-alert&quot;: &quot;^2.7.0&quot;,
130    &quot;react-content-loader&quot;: &quot;^6.0.1&quot;,
131    &quot;react-countdown&quot;: &quot;^2.3.1&quot;,
132    &quot;react-countup&quot;: &quot;^4.3.3&quot;,
133    &quot;react-cropper&quot;: &quot;^2.1.4&quot;,
134    &quot;react-data-table-component&quot;: &quot;^6.11.8&quot;,
135    &quot;react-date-picker&quot;: &quot;^8.0.6&quot;,
136    &quot;react-datepicker&quot;: &quot;^3.4.1&quot;,
137    &quot;react-dom&quot;: &quot;^16.13.1&quot;,
138    &quot;react-draft-wysiwyg&quot;: &quot;^1.14.5&quot;,
139    &quot;react-drag-listview&quot;: &quot;^0.1.8&quot;,
140    &quot;react-drawer&quot;: &quot;^1.3.4&quot;,
141    &quot;react-dropzone&quot;: &quot;^11.2.4&quot;,
142    &quot;react-dual-listbox&quot;: &quot;^2.0.0&quot;,
143    &quot;react-facebook-login&quot;: &quot;^4.1.1&quot;,
144    &quot;react-flatpickr&quot;: &quot;^3.10.6&quot;,
145    &quot;react-google-login&quot;: &quot;^5.2.2&quot;,
146    &quot;react-hook-form&quot;: &quot;^7.15.2&quot;,
147    &quot;react-i18next&quot;: &quot;^11.8.5&quot;,
148    &quot;react-icons&quot;: &quot;^4.2.0&quot;,
149    &quot;react-image-lightbox&quot;: &quot;^5.1.1&quot;,
150    &quot;react-input-mask&quot;: &quot;^2.0.4&quot;,
151    &quot;react-jvectormap&quot;: &quot;^0.0.16&quot;,
152    &quot;react-leaflet&quot;: &quot;^3.0.5&quot;,
153    &quot;react-meta-tags&quot;: &quot;^1.0.1&quot;,
154    &quot;react-modal-video&quot;: &quot;^1.2.6&quot;,
155    &quot;react-notifications&quot;: &quot;^1.7.2&quot;,
156    &quot;react-number-format&quot;: &quot;^4.7.3&quot;,
157    &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,
158    &quot;react-rangeslider&quot;: &quot;^2.2.0&quot;,
159    &quot;react-rating&quot;: &quot;^2.0.5&quot;,
160    &quot;react-rating-tooltip&quot;: &quot;^1.1.6&quot;,
161    &quot;react-redux&quot;: &quot;^7.2.1&quot;,
162    &quot;react-responsive-carousel&quot;: &quot;^3.2.11&quot;,
163    &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
164    &quot;react-script&quot;: &quot;^2.0.5&quot;,
165    &quot;react-scripts&quot;: &quot;3.4.3&quot;,
166    &quot;react-select&quot;: &quot;^4.3.1&quot;,
167    &quot;react-sparklines&quot;: &quot;^1.7.0&quot;,
168    &quot;react-star-ratings&quot;: &quot;^2.3.0&quot;,
169    &quot;react-super-responsive-table&quot;: &quot;^5.2.0&quot;,
170    &quot;react-switch&quot;: &quot;^6.0.0&quot;,
171    &quot;react-table&quot;: &quot;^7.6.3&quot;,
172    &quot;react-toastify&quot;: &quot;^7.0.3&quot;,
173    &quot;react-toastr&quot;: &quot;^3.0.0&quot;,
174    &quot;react-twitter-auth&quot;: &quot;0.0.13&quot;,
175    &quot;reactstrap&quot;: &quot;^8.8.1&quot;,
176    &quot;recharts&quot;: &quot;^2.0.8&quot;,
177    &quot;redux&quot;: &quot;^4.0.5&quot;,
178    &quot;redux-saga&quot;: &quot;^1.1.3&quot;,
179    &quot;reselect&quot;: &quot;^4.0.0&quot;,
180    &quot;sass&quot;: &quot;^1.37.5&quot;,
181    &quot;simplebar-react&quot;: &quot;^2.3.0&quot;,
182    &quot;styled&quot;: &quot;^1.0.0&quot;,
183    &quot;styled-components&quot;: &quot;^5.2.1&quot;,
184    &quot;toastr&quot;: &quot;^2.1.4&quot;,
185    &quot;typescript&quot;: &quot;^4.0.2&quot;,
186    &quot;universal-cookie&quot;: &quot;^4.0.4&quot;
187  },
188  &quot;devDependencies&quot;: {
189    &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^2.27.0&quot;,
190    &quot;@typescript-eslint/parser&quot;: &quot;^2.27.0&quot;,
191    &quot;@typescript-eslint/typescript-estree&quot;: &quot;^4.15.2&quot;,
192    &quot;eslint-config-prettier&quot;: &quot;^6.10.1&quot;,
193    &quot;eslint-plugin-prettier&quot;: &quot;^3.1.2&quot;,
194    &quot;husky&quot;: &quot;^4.2.5&quot;,
195    &quot;lint-staged&quot;: &quot;^10.1.3&quot;,
196    &quot;prettier&quot;: &quot;^1.19.1&quot;,
197    &quot;react-test-renderer&quot;: &quot;^16.13.1&quot;,
198    &quot;redux-devtools-extension&quot;: &quot;^2.13.8&quot;,
199    &quot;redux-mock-store&quot;: &quot;^1.5.4&quot;
200  },
201  &quot;scripts&quot;: {
202    &quot;start&quot;: &quot;react-scripts start&quot;,
203    &quot;build&quot;: &quot;react-scripts build &amp;&amp; mv build ./deploy/build&quot;,
204    &quot;build-local&quot;: &quot;react-scripts build&quot;,
205    &quot;test&quot;: &quot;react-scripts test&quot;,
206    &quot;eject&quot;: &quot;react-scripts eject&quot;
207  },
208  &quot;eslintConfig&quot;: {
209    &quot;extends&quot;: &quot;react-app&quot;
210  },
211  &quot;husky&quot;: {
212    &quot;hooks&quot;: {
213      &quot;pre-commit&quot;: &quot;lint-staged&quot;
214    }
215  },
216  &quot;lint-staged&quot;: {
217    &quot;*.{js,ts,tsx}&quot;: [
218      &quot;eslint --fix&quot;
219    ]
220  },
221  &quot;browserslist&quot;: {
222    &quot;production&quot;: [
223      &quot;&gt;0.2%&quot;,
224      &quot;not dead&quot;,
225      &quot;not op_mini all&quot;
226    ],
227    &quot;development&quot;: [
228      &quot;last 1 chrome version&quot;,
229      &quot;last 1 firefox version&quot;,
230      &quot;last 1 safari version&quot;
231    ]
232  }
233}
234    - name: Fix up git URLs
235      run: echo -e '[url &quot;https://github.com/&quot;]\n  insteadOf = &quot;git://github.com/&quot;' &gt;&gt; ~/.gitconfig
236git config --global url.&quot;https://github.com/&quot;.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 &quot;::set-output name=environment::prod_stackstream&quot; ; echo &quot;::set-output name=api-url::api&quot; ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo &quot;::set-output name=environment::staging_stackstream&quot;  ; echo &quot;::set-output name=api-url::stagingapi&quot; ; else echo &quot;::set-output name=environment::dev_stackstream&quot; ; echo &quot;::set-output name=api-url::devapi&quot; ; 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  &quot;name&quot;: &quot;stackstream-fe&quot;,
57  &quot;version&quot;: &quot;1.0.0&quot;,
58  &quot;authors&quot;: [
59    &quot;fayyaznofal@gmail.com&quot;
60  ],
61  &quot;private&quot;: true,
62  &quot;dependencies&quot;: {
63    &quot;@fortawesome/fontawesome-svg-core&quot;: &quot;^1.2.34&quot;,
64    &quot;@fortawesome/free-solid-svg-icons&quot;: &quot;^5.15.2&quot;,
65    &quot;@fortawesome/react-fontawesome&quot;: &quot;^0.1.14&quot;,
66    &quot;@fullcalendar/bootstrap&quot;: &quot;^5.5.0&quot;,
67    &quot;@fullcalendar/core&quot;: &quot;^5.5.0&quot;,
68    &quot;@fullcalendar/daygrid&quot;: &quot;^5.5.0&quot;,
69    &quot;@fullcalendar/interaction&quot;: &quot;^5.5.0&quot;,
70    &quot;@fullcalendar/react&quot;: &quot;^5.5.0&quot;,
71    &quot;@lourenci/react-kanban&quot;: &quot;^2.1.0&quot;,
72    &quot;@redux-saga/simple-saga-monitor&quot;: &quot;^1.1.2&quot;,
73    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.9&quot;,
74    &quot;@testing-library/react&quot;: &quot;^11.2.3&quot;,
75    &quot;@testing-library/user-event&quot;: &quot;^12.6.0&quot;,
76    &quot;@toast-ui/react-chart&quot;: &quot;^1.0.2&quot;,
77    &quot;@types/jest&quot;: &quot;^26.0.14&quot;,
78    &quot;@types/node&quot;: &quot;^14.10.3&quot;,
79    &quot;@types/react&quot;: &quot;^16.9.49&quot;,
80    &quot;@types/react-dom&quot;: &quot;^16.9.8&quot;,
81    &quot;@vtaits/react-color-picker&quot;: &quot;^0.1.1&quot;,
82    &quot;apexcharts&quot;: &quot;^3.23.1&quot;,
83    &quot;availity-reactstrap-validation&quot;: &quot;^2.7.0&quot;,
84    &quot;axios&quot;: &quot;^0.21.1&quot;,
85    &quot;axios-mock-adapter&quot;: &quot;^1.19.0&quot;,
86    &quot;axios-progress-bar&quot;: &quot;^1.2.0&quot;,
87    &quot;bootstrap&quot;: &quot;^5.0.0-beta2&quot;,
88    &quot;chart.js&quot;: &quot;^2.9.4&quot;,
89    &quot;chartist&quot;: &quot;^0.11.4&quot;,
90    &quot;classnames&quot;: &quot;^2.2.6&quot;,
91    &quot;components&quot;: &quot;^0.1.0&quot;,
92    &quot;dotenv&quot;: &quot;^8.2.0&quot;,
93    &quot;draft-js&quot;: &quot;^0.11.7&quot;,
94    &quot;echarts&quot;: &quot;^4.9.0&quot;,
95    &quot;echarts-for-react&quot;: &quot;^2.0.16&quot;,
96    &quot;firebase&quot;: &quot;^8.2.3&quot;,
97    &quot;google-maps-react&quot;: &quot;^2.0.6&quot;,
98    &quot;history&quot;: &quot;^4.10.1&quot;,
99    &quot;i&quot;: &quot;^0.3.6&quot;,
100    &quot;i18next&quot;: &quot;^19.8.4&quot;,
101    &quot;i18next-browser-languagedetector&quot;: &quot;^6.0.1&quot;,
102    &quot;jsonwebtoken&quot;: &quot;^8.5.1&quot;,
103    &quot;leaflet&quot;: &quot;^1.7.1&quot;,
104    &quot;lodash&quot;: &quot;^4.17.21&quot;,
105    &quot;lodash.clonedeep&quot;: &quot;^4.5.0&quot;,
106    &quot;lodash.get&quot;: &quot;^4.4.2&quot;,
107    &quot;metismenujs&quot;: &quot;^1.2.1&quot;,
108    &quot;mkdirp&quot;: &quot;^1.0.4&quot;,
109    &quot;moment&quot;: &quot;2.29.1&quot;,
110    &quot;moment-timezone&quot;: &quot;^0.5.32&quot;,
111    &quot;nouislider-react&quot;: &quot;^3.3.9&quot;,
112    &quot;npm&quot;: &quot;^7.6.3&quot;,
113    &quot;prop-types&quot;: &quot;^15.7.2&quot;,
114    &quot;query-string&quot;: &quot;^6.14.0&quot;,
115    &quot;react&quot;: &quot;^16.13.1&quot;,
116    &quot;react-apexcharts&quot;: &quot;^1.3.7&quot;,
117    &quot;react-auth-code-input&quot;: &quot;^1.0.0&quot;,
118    &quot;react-avatar&quot;: &quot;^3.10.0&quot;,
119    &quot;react-bootstrap&quot;: &quot;^1.5.0&quot;,
120    &quot;react-bootstrap-editable&quot;: &quot;^0.8.2&quot;,
121    &quot;react-bootstrap-sweetalert&quot;: &quot;^5.2.0&quot;,
122    &quot;react-bootstrap-table-next&quot;: &quot;^4.0.3&quot;,
123    &quot;react-bootstrap-table2-editor&quot;: &quot;^1.4.0&quot;,
124    &quot;react-bootstrap-table2-paginator&quot;: &quot;^2.1.2&quot;,
125    &quot;react-bootstrap-table2-toolkit&quot;: &quot;^2.1.3&quot;,
126    &quot;react-chartist&quot;: &quot;^0.14.3&quot;,
127    &quot;react-chartjs-2&quot;: &quot;^2.11.1&quot;,
128    &quot;react-color&quot;: &quot;^2.19.3&quot;,
129    &quot;react-confirm-alert&quot;: &quot;^2.7.0&quot;,
130    &quot;react-content-loader&quot;: &quot;^6.0.1&quot;,
131    &quot;react-countdown&quot;: &quot;^2.3.1&quot;,
132    &quot;react-countup&quot;: &quot;^4.3.3&quot;,
133    &quot;react-cropper&quot;: &quot;^2.1.4&quot;,
134    &quot;react-data-table-component&quot;: &quot;^6.11.8&quot;,
135    &quot;react-date-picker&quot;: &quot;^8.0.6&quot;,
136    &quot;react-datepicker&quot;: &quot;^3.4.1&quot;,
137    &quot;react-dom&quot;: &quot;^16.13.1&quot;,
138    &quot;react-draft-wysiwyg&quot;: &quot;^1.14.5&quot;,
139    &quot;react-drag-listview&quot;: &quot;^0.1.8&quot;,
140    &quot;react-drawer&quot;: &quot;^1.3.4&quot;,
141    &quot;react-dropzone&quot;: &quot;^11.2.4&quot;,
142    &quot;react-dual-listbox&quot;: &quot;^2.0.0&quot;,
143    &quot;react-facebook-login&quot;: &quot;^4.1.1&quot;,
144    &quot;react-flatpickr&quot;: &quot;^3.10.6&quot;,
145    &quot;react-google-login&quot;: &quot;^5.2.2&quot;,
146    &quot;react-hook-form&quot;: &quot;^7.15.2&quot;,
147    &quot;react-i18next&quot;: &quot;^11.8.5&quot;,
148    &quot;react-icons&quot;: &quot;^4.2.0&quot;,
149    &quot;react-image-lightbox&quot;: &quot;^5.1.1&quot;,
150    &quot;react-input-mask&quot;: &quot;^2.0.4&quot;,
151    &quot;react-jvectormap&quot;: &quot;^0.0.16&quot;,
152    &quot;react-leaflet&quot;: &quot;^3.0.5&quot;,
153    &quot;react-meta-tags&quot;: &quot;^1.0.1&quot;,
154    &quot;react-modal-video&quot;: &quot;^1.2.6&quot;,
155    &quot;react-notifications&quot;: &quot;^1.7.2&quot;,
156    &quot;react-number-format&quot;: &quot;^4.7.3&quot;,
157    &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,
158    &quot;react-rangeslider&quot;: &quot;^2.2.0&quot;,
159    &quot;react-rating&quot;: &quot;^2.0.5&quot;,
160    &quot;react-rating-tooltip&quot;: &quot;^1.1.6&quot;,
161    &quot;react-redux&quot;: &quot;^7.2.1&quot;,
162    &quot;react-responsive-carousel&quot;: &quot;^3.2.11&quot;,
163    &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
164    &quot;react-script&quot;: &quot;^2.0.5&quot;,
165    &quot;react-scripts&quot;: &quot;3.4.3&quot;,
166    &quot;react-select&quot;: &quot;^4.3.1&quot;,
167    &quot;react-sparklines&quot;: &quot;^1.7.0&quot;,
168    &quot;react-star-ratings&quot;: &quot;^2.3.0&quot;,
169    &quot;react-super-responsive-table&quot;: &quot;^5.2.0&quot;,
170    &quot;react-switch&quot;: &quot;^6.0.0&quot;,
171    &quot;react-table&quot;: &quot;^7.6.3&quot;,
172    &quot;react-toastify&quot;: &quot;^7.0.3&quot;,
173    &quot;react-toastr&quot;: &quot;^3.0.0&quot;,
174    &quot;react-twitter-auth&quot;: &quot;0.0.13&quot;,
175    &quot;reactstrap&quot;: &quot;^8.8.1&quot;,
176    &quot;recharts&quot;: &quot;^2.0.8&quot;,
177    &quot;redux&quot;: &quot;^4.0.5&quot;,
178    &quot;redux-saga&quot;: &quot;^1.1.3&quot;,
179    &quot;reselect&quot;: &quot;^4.0.0&quot;,
180    &quot;sass&quot;: &quot;^1.37.5&quot;,
181    &quot;simplebar-react&quot;: &quot;^2.3.0&quot;,
182    &quot;styled&quot;: &quot;^1.0.0&quot;,
183    &quot;styled-components&quot;: &quot;^5.2.1&quot;,
184    &quot;toastr&quot;: &quot;^2.1.4&quot;,
185    &quot;typescript&quot;: &quot;^4.0.2&quot;,
186    &quot;universal-cookie&quot;: &quot;^4.0.4&quot;
187  },
188  &quot;devDependencies&quot;: {
189    &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^2.27.0&quot;,
190    &quot;@typescript-eslint/parser&quot;: &quot;^2.27.0&quot;,
191    &quot;@typescript-eslint/typescript-estree&quot;: &quot;^4.15.2&quot;,
192    &quot;eslint-config-prettier&quot;: &quot;^6.10.1&quot;,
193    &quot;eslint-plugin-prettier&quot;: &quot;^3.1.2&quot;,
194    &quot;husky&quot;: &quot;^4.2.5&quot;,
195    &quot;lint-staged&quot;: &quot;^10.1.3&quot;,
196    &quot;prettier&quot;: &quot;^1.19.1&quot;,
197    &quot;react-test-renderer&quot;: &quot;^16.13.1&quot;,
198    &quot;redux-devtools-extension&quot;: &quot;^2.13.8&quot;,
199    &quot;redux-mock-store&quot;: &quot;^1.5.4&quot;
200  },
201  &quot;scripts&quot;: {
202    &quot;start&quot;: &quot;react-scripts start&quot;,
203    &quot;build&quot;: &quot;react-scripts build &amp;&amp; mv build ./deploy/build&quot;,
204    &quot;build-local&quot;: &quot;react-scripts build&quot;,
205    &quot;test&quot;: &quot;react-scripts test&quot;,
206    &quot;eject&quot;: &quot;react-scripts eject&quot;
207  },
208  &quot;eslintConfig&quot;: {
209    &quot;extends&quot;: &quot;react-app&quot;
210  },
211  &quot;husky&quot;: {
212    &quot;hooks&quot;: {
213      &quot;pre-commit&quot;: &quot;lint-staged&quot;
214    }
215  },
216  &quot;lint-staged&quot;: {
217    &quot;*.{js,ts,tsx}&quot;: [
218      &quot;eslint --fix&quot;
219    ]
220  },
221  &quot;browserslist&quot;: {
222    &quot;production&quot;: [
223      &quot;&gt;0.2%&quot;,
224      &quot;not dead&quot;,
225      &quot;not op_mini all&quot;
226    ],
227    &quot;development&quot;: [
228      &quot;last 1 chrome version&quot;,
229      &quot;last 1 firefox version&quot;,
230      &quot;last 1 safari version&quot;
231    ]
232  }
233}
234    - name: Fix up git URLs
235      run: echo -e '[url &quot;https://github.com/&quot;]\n  insteadOf = &quot;git://github.com/&quot;' &gt;&gt; ~/.gitconfig
236git config --global url.&quot;https://github.com/&quot;.insteadOf git://github.com/
237git config --global url.&quot;git@github.com:&quot;.insteadOf git://github.com/
238

That will change any git://github.com/ (unencrypted Git protocol) into git@github.com: (SSH URL).

Source https://stackoverflow.com/questions/70663523

QUESTION

Consider using the &quot;jsdom&quot; test environment

Asked 2022-Mar-23 at 20:23

I have this simple test:

1import React from 'react'
2import { render } from '@testing-library/react'
3
4import Button from '.'
5
6describe('Button', () =&gt; {
7  it('renders button without crashing', () =&gt; {
8    const label = 'test'
9
10    render(&lt;Button label={label} /&gt;)
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', () =&gt; {
7  it('renders button without crashing', () =&gt; {
8    const label = 'test'
9
10    render(&lt;Button label={label} /&gt;)
11  })
12})
13
14{
15  &quot;setupFilesAfterEnv&quot;: [
16    &quot;&lt;rootDir&gt;/lib/settings/setupTests.ts&quot;
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', () =&gt; {
7  it('renders button without crashing', () =&gt; {
8    const label = 'test'
9
10    render(&lt;Button label={label} /&gt;)
11  })
12})
13
14{
15  &quot;setupFilesAfterEnv&quot;: [
16    &quot;&lt;rootDir&gt;/lib/settings/setupTests.ts&quot;
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:17

In your package.json, or jest.config.js/jest.config.js, change the value of the testEnvironment property to jsdom.

Package.json
1import React from 'react'
2import { render } from '@testing-library/react'
3
4import Button from '.'
5
6describe('Button', () =&gt; {
7  it('renders button without crashing', () =&gt; {
8    const label = 'test'
9
10    render(&lt;Button label={label} /&gt;)
11  })
12})
13
14{
15  &quot;setupFilesAfterEnv&quot;: [
16    &quot;&lt;rootDir&gt;/lib/settings/setupTests.ts&quot;
17  ]
18}
19import '@testing-library/jest-dom'
20&quot;jest&quot;:{
21    &quot;testEnvironment&quot;: &quot;jsdom&quot;
22}
23
jest.config.[js|ts]
1import React from 'react'
2import { render } from '@testing-library/react'
3
4import Button from '.'
5
6describe('Button', () =&gt; {
7  it('renders button without crashing', () =&gt; {
8    const label = 'test'
9
10    render(&lt;Button label={label} /&gt;)
11  })
12})
13
14{
15  &quot;setupFilesAfterEnv&quot;: [
16    &quot;&lt;rootDir&gt;/lib/settings/setupTests.ts&quot;
17  ]
18}
19import '@testing-library/jest-dom'
20&quot;jest&quot;:{
21    &quot;testEnvironment&quot;: &quot;jsdom&quot;
22}
23{
24    &quot;testEnvironment&quot;: &quot;jsdom&quot;
25}
26
Why?

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.

Additional reading

jest testEnvironment documentation

Source https://stackoverflow.com/questions/69227566

QUESTION

Installing scipy and scikit-learn on apple m1

Asked 2022-Mar-22 at 06:21

The 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:33

Please see this note of scikit-learn about

Installing on Apple Silicon M1 hardware

The recently introduced macos/arm64 platform (sometimes also known as macos/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:

https://github.com/scikit-learn/scikit-learn/issues/19137

Source https://stackoverflow.com/questions/68620927

QUESTION

TypeError: load() missing 1 required positional argument: 'Loader' in Google Colab

Asked 2022-Mar-04 at 11:01

I 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&lt;ipython-input-19-86e89bd44552&gt; in &lt;module&gt;()
6----&gt; 1 import plotly.express as px
7
89 frames
9/usr/local/lib/python3.7/dist-packages/plotly/express/__init__.py in &lt;module&gt;()
10     13     )
11     14 
12---&gt; 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 &lt;module&gt;()
17      9 
18     10 try:
19---&gt; 11     import xarray
20     12 
21     13     xarray_imported = True
22
23/usr/local/lib/python3.7/dist-packages/xarray/__init__.py in &lt;module&gt;()
24      1 import pkg_resources
25      2 
26----&gt; 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 &lt;module&gt;()
31     11 import numpy as np
32     12 
33---&gt; 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 &lt;module&gt;()
38      4 formats. They should not be used directly, but rather through Dataset objects.
39      5 
40----&gt; 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 &lt;module&gt;()
45     14     _normalize_path,
46     15 )
47---&gt; 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 &lt;module&gt;()
52     11 
53     12 try:
54---&gt; 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 &lt;module&gt;()
59      1 # flake8: noqa
60      2 try:
61----&gt; 3     from distributed import *
62      4 except ImportError:
63      5     msg = (
64
65/usr/local/lib/python3.7/dist-packages/distributed/__init__.py in &lt;module&gt;()
66      1 from __future__ import print_function, division, absolute_import
67      2 
68----&gt; 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 &lt;module&gt;()
73     18 
74     19 with open(fn) as f:
75---&gt; 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:11

Found 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&lt;ipython-input-19-86e89bd44552&gt; in &lt;module&gt;()
6----&gt; 1 import plotly.express as px
7
89 frames
9/usr/local/lib/python3.7/dist-packages/plotly/express/__init__.py in &lt;module&gt;()
10     13     )
11     14 
12---&gt; 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 &lt;module&gt;()
17      9 
18     10 try:
19---&gt; 11     import xarray
20     12 
21     13     xarray_imported = True
22
23/usr/local/lib/python3.7/dist-packages/xarray/__init__.py in &lt;module&gt;()
24      1 import pkg_resources
25      2 
26----&gt; 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 &lt;module&gt;()
31     11 import numpy as np
32     12 
33---&gt; 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 &lt;module&gt;()
38      4 formats. They should not be used directly, but rather through Dataset objects.
39      5 
40----&gt; 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 &lt;module&gt;()
45     14     _normalize_path,
46     15 )
47---&gt; 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 &lt;module&gt;()
52     11 
53     12 try:
54---&gt; 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 &lt;module&gt;()
59      1 # flake8: noqa
60      2 try:
61----&gt; 3     from distributed import *
62      4 except ImportError:
63      5     msg = (
64
65/usr/local/lib/python3.7/dist-packages/distributed/__init__.py in &lt;module&gt;()
66      1 from __future__ import print_function, division, absolute_import
67      2 
68----&gt; 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 &lt;module&gt;()
73     18 
74     19 with open(fn) as f:
75---&gt; 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.

Source https://stackoverflow.com/questions/69564817

QUESTION

Switch' is not exported from 'react-router-dom'

Asked 2022-Mar-01 at 09:07

In 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  &lt;BrowserRouter&gt;
5     &lt;App /&gt;
6  &lt;/BrowserRouter&gt;,
7  document.getElementById('root')
8);
9

App.js:

1import {BrowserRouter} from 'react-router-dom';
2
3ReactDOM.render(
4  &lt;BrowserRouter&gt;
5     &lt;App /&gt;
6  &lt;/BrowserRouter&gt;,
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    &lt;div className=&quot;App&quot;&gt;
25     
26    &lt;div&gt;
27      &lt;Link to=&quot;/&quot;&gt;Home&lt;/Link&gt;
28    &lt;/div&gt;
29
30    &lt;hr /&gt;
31
32    &lt;Switch&gt;
33      &lt;Route exact path=&quot;/&quot;&gt;
34        &lt;Home/&gt;
35      &lt;/Route&gt;
36    &lt;/Switch&gt;
37 
38  &lt;/div&gt;
39 
40);
41 }
42}
43
44export default App;
45
46import React from 'react';
47
48    const Home = () =&gt; {
49    return &lt;h1&gt;Home&lt;/h1&gt;;
50  };
51  
52  export default Home;
53

package.json

1import {BrowserRouter} from 'react-router-dom';
2
3ReactDOM.render(
4  &lt;BrowserRouter&gt;
5     &lt;App /&gt;
6  &lt;/BrowserRouter&gt;,
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    &lt;div className=&quot;App&quot;&gt;
25     
26    &lt;div&gt;
27      &lt;Link to=&quot;/&quot;&gt;Home&lt;/Link&gt;
28    &lt;/div&gt;
29
30    &lt;hr /&gt;
31
32    &lt;Switch&gt;
33      &lt;Route exact path=&quot;/&quot;&gt;
34        &lt;Home/&gt;
35      &lt;/Route&gt;
36    &lt;/Switch&gt;
37 
38  &lt;/div&gt;
39 
40);
41 }
42}
43
44export default App;
45
46import React from 'react';
47
48    const Home = () =&gt; {
49    return &lt;h1&gt;Home&lt;/h1&gt;;
50  };
51  
52  export default Home;
53&quot;dependencies&quot;: {
54    &quot;@babel/core&quot;: &quot;^7.16.0&quot;,
55    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.4&quot;,
56    &quot;@testing-library/react&quot;: &quot;^11.1.0&quot;,
57    &quot;@testing-library/user-event&quot;: &quot;^12.1.10&quot;,
58    &quot;react&quot;: &quot;^17.0.2&quot;,
59    &quot;react-dom&quot;: &quot;^17.0.2&quot;,
60    &quot;react-router&quot;: &quot;^6.0.0&quot;,
61    &quot;react-router-dom&quot;: &quot;^6.0.0&quot;,
62    &quot;react-scripts&quot;: &quot;4.0.3&quot;,
63    &quot;web-vitals&quot;: &quot;^1.0.1&quot;
64  },
65

ANSWER

Answered 2021-Nov-04 at 18:10
Using Routes 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  &lt;BrowserRouter&gt;
5     &lt;App /&gt;
6  &lt;/BrowserRouter&gt;,
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    &lt;div className=&quot;App&quot;&gt;
25     
26    &lt;div&gt;
27      &lt;Link to=&quot;/&quot;&gt;Home&lt;/Link&gt;
28    &lt;/div&gt;
29
30    &lt;hr /&gt;
31
32    &lt;Switch&gt;
33      &lt;Route exact path=&quot;/&quot;&gt;
34        &lt;Home/&gt;
35      &lt;/Route&gt;
36    &lt;/Switch&gt;
37 
38  &lt;/div&gt;
39 
40);
41 }
42}
43
44export default App;
45
46import React from 'react';
47
48    const Home = () =&gt; {
49    return &lt;h1&gt;Home&lt;/h1&gt;;
50  };
51  
52  export default Home;
53&quot;dependencies&quot;: {
54    &quot;@babel/core&quot;: &quot;^7.16.0&quot;,
55    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.4&quot;,
56    &quot;@testing-library/react&quot;: &quot;^11.1.0&quot;,
57    &quot;@testing-library/user-event&quot;: &quot;^12.1.10&quot;,
58    &quot;react&quot;: &quot;^17.0.2&quot;,
59    &quot;react-dom&quot;: &quot;^17.0.2&quot;,
60    &quot;react-router&quot;: &quot;^6.0.0&quot;,
61    &quot;react-router-dom&quot;: &quot;^6.0.0&quot;,
62    &quot;react-scripts&quot;: &quot;4.0.3&quot;,
63    &quot;web-vitals&quot;: &quot;^1.0.1&quot;
64  },
65import {
66  BrowserRouter,
67  Routes, // instead of &quot;Switch&quot;
68  Route,
69} from &quot;react-router-dom&quot;;
70
71// ...
72
73    &lt;BrowserRouter&gt;
74      &lt;Routes&gt;
75        &lt;Route exact path=&quot;/&quot; element={&lt;Home /&gt;}&gt;
76          &lt;Home/&gt;
77        &lt;/Route&gt;
78      &lt;/Routes&gt;
79    &lt;/BrowserRouter&gt;
80

Note that you now also pass your component as the element prop instead of using children.

Source https://stackoverflow.com/questions/69843615

QUESTION

IntelliJ - Git is not installed: Cannot identify version of git executable: no response

Asked 2022-Feb-14 at 04:51

I'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:23

In my case the issue was solved by invalidating cache and restarting IDE. Simply go to Files -> Invalidate Caches -> Invalidate and Restart.

Source https://stackoverflow.com/questions/69295464

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

Share this Page

share link

Get latest updates on Testing