javascript

React Jsx Expressions Must Have One Parent Element.

## problem When I tried duplicate the components in return, i got this error propt. code exam…

TwoPunch created at Jan. 3, 2022, 3:43 p.m.

Nodejs Builds A Server Locally, Simulates Interface Requests, And Obtains Json Data

## install node.js First, you must install nodejs, if not, go to the node official website next …

TwoPunch created at Dec. 29, 2021, 3:26 p.m.

Express:Node Throwing Error On Mongodb

## error ``` 1: C:\Node_app\microblog\node_modules\connect-mongo\lib\connect-mongo.js:126 …

TwoPunch created at Dec. 29, 2021, 4:49 a.m.

Got 'Undefined' When Trying To Get A Field From Jsonresponse

## problem Bellow is a code snippt of my web editor used to upload image with `XMLHttpRequest`: …

TwoPunch created at Dec. 28, 2021, 11:37 p.m.

This Dependency Was Not Found+ Error: Ebusy: Resource Busy Or Locked, Lstat ‘D:\Dumpstack.

## error Encountered such an error when executing `npm run serve`. The first thing that needs…

TwoPunch created at Dec. 24, 2021, 2:37 p.m.

Vite.Config.Js Of Vue3-Vite-Antdv2.X

## vite.config.js `vite.config.js` configuration for `vue3 + vite + antdv2.x` in the project, ju…

TwoPunch created at Dec. 23, 2021, 3:09 a.m.

Videojs: Error: (Code:4 Media_Err_Src_Not_Supported) No Compatible Source Was Found For

## Error message ``` VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) No compatible source …

TwoPunch created at Dec. 22, 2021, 11:31 p.m.

Vscode Error Unexpected Trailing Comma Comma-Dangle

## problem In fact, it is very simple, that is, the Eslint code detects that **you have added an…

TwoPunch created at Dec. 22, 2021, 11:20 p.m.

Npm Run Serve Reported An Error: Error: Cannot Find Module ‘Webpack’ Require Stack

## problem1 After the project is pulled down, the dependencies are installed normally, and the p…

TwoPunch created at Dec. 20, 2021, 10:04 p.m.

Error: No Globalscriptengine In $Where Parsing

## error Use mongodb aggregate query, use javascript expression in `$where` condition, execute e…

TwoPunch created at Dec. 13, 2021, 2:56 p.m.

Parsing Error: Adjacent Jsx Elements Must Be Wrapped In An Enclosing Tag. Did You Want A Jsx Fragmen

## solution configure `.eslintrc.js`  ``` "extends": ["vue", "standard", "plugin:vue/recomme…

TwoPunch created at Dec. 12, 2021, 9:07 a.m.

Error Error: Reanimated 2 Failed To Create A Worklet

## error ``` To reload the app press "r" To open developer menu press "d" BUNDLE ./index.…

TwoPunch created at Dec. 11, 2021, 2:05 p.m.

Javascript: 5 Ways To Determine Whether A String Contains Another String

This article brings you five methods for judging whether a string contains another string in JS. Th…

TwoPunch created at Dec. 11, 2021, 1:51 p.m.

Attempted Import Error: ‘Switch‘ Is Not Exported From ‘React-Router-Dom‘

## Switch 1. In versions above V6.0, Routers has replaced Switch 2. Under normal circumstance…

TwoPunch created at Dec. 11, 2021, 1:38 p.m.

Attempted Import Error: ‘Switch‘ Is Not Exported From ‘React-Router-Dom‘

## code ``` <Router initialEntries={['/home']}> <Switch> <Route e…

TwoPunch created at Dec. 5, 2021, 6:37 p.m.

Module Not Found: Error: Can't Resolve 'Core-Js/Modules/Es.Regexp.Dot-All.Js'

## error Use regular constructor ``` check (objString = '{}') { const result = JSON.s…

TwoPunch created at Nov. 25, 2021, 1:40 p.m.

Javascript Prevent A Tag Open The Page Of Its Url

Need to add a click event to the a tag, and deal with some affairs before jumping, so some processi…

TwoPunch created at Nov. 22, 2021, 3:26 a.m.

Typescript And Javascript Comparison (Difference)

TypeScript and JavaScript are the two most popular scripting languages in project development. Type…

TwoPunch created at Nov. 16, 2021, 1:46 p.m.

Javascript Load Pictures Asynchronously

## 1\. Usage scenarios In the case of slow image access, you can give the image priority to set …

TwoPunch created at Nov. 15, 2021, 1:25 p.m.

Ie Browser Reported An Error Unhandled Promise Rejection Error: Access Is Denied. File Streaming Download

## problem There are many export files and file download functions in the project. The front end…

TwoPunch created at Nov. 3, 2021, 2:59 p.m.

How To Fix "Replaceall Is Not A Function" Javascript Error?

## Why this error reported If you see the error `TypeError: replaceAll is not a function`, it ma…

TwoPunch created at Oct. 27, 2021, 1:07 p.m.

Javascript, Allow Only Numbers To Be Entered In Form

## code ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta ht…

TwoPunch created at Oct. 19, 2021, 6:02 p.m.

Syntaxerror: Invalid Regular Expression: Invalid Group Specifier Name

This is because the Safari browser does not support two // regular expression zero-degree assertion…

TwoPunch created at Oct. 16, 2021, 6:44 a.m.

Img Tag Onerror Event

Sometimes, the src picture in the img tag fails to load, and a fragment icon appears in the origina…

TwoPunch created at Oct. 12, 2021, 11:02 a.m.

Error Parsing Error: Unexpected Reserved Word ‘Await‘

## reason The `await` keyword is **only valid in async function**. If you use await outside …

doporos created at Oct. 2, 2021, 11:53 a.m.

Pure Javascript Controls Multiple Scroll Bars To Scroll Synchronously

## Introduction Some websites that support writing articles in markdown generally support markdo…

doporos created at Sept. 28, 2021, 5:43 p.m.

Error Error: Cannot Find Module ‘Vue-Loader-V16/Package.Json‘

## error ``` ERROR Error: Cannot find module 'vue-loader-v16/package.json' Error: Cannot find…

doporos created at Sept. 27, 2021, 5:11 p.m.

Error - Element - Unknown Custom Element: <El-Upload> - Did You Register The Component Correctl

## include CDN: error message: ``` Unknown custom element: - did you register the component …

doporos created at Sept. 4, 2021, 2:55 p.m.

Error - Canvas- Failed To Execute 'Toblob' On 'Htmlcanvaselement': Tainted Canvases May Not Be Exported

The reason lies in the use of cross-domain pictures, so it is a contaminated canvas. ## solution…

doporos created at Sept. 4, 2021, 2:52 p.m.

Javascript .Replaceall() Is Not A Function Type Error

## solution Check the browser version used, the browser version is lower. type this address i…

doporos created at Aug. 23, 2021, 1:36 p.m.

Fetch Or Axios, Which Is More Suitable For Http Requests?

## Introduction One of the most important parts of front-end development is to communicate with …

doporos created at Aug. 17, 2021, 2:23 p.m.

Jquery Countdown Effect After Clicking Button: Useful In Mobile Phone / Email Verification Code

jquery realizes the countdown effect after clicking the button, which is mostly used to realize the…

robot18 created at July 24, 2021, 2:43 p.m.

How To Position The Cursor And Get The Last Position Of The Cursor In The Html Edit Box

In HTML, the cursor is an object, and the cursor object appears only when you select an element. …

robot18 created at July 15, 2021, 9:59 a.m.

Javascript Lookup With Specified Tag And Class Value

## usage ``` function getClass(tagName,className) //Get the element whose tag name is tagName …

robot18 created at July 15, 2021, 9:40 a.m.

Uncaught Syntaxerror: Unexpected Token <

## description When I was writing the code today, I found the js error of `"Uncaught SyntaxError…

robot18 created at July 11, 2021, 10:23 p.m.

Cannot Find Module 'Webpack/Bin/Config-Yargs'

## description ``` npm install webpack webpack-cli webpack-dev-server ``` `package.json` sc…

robot18 created at July 10, 2021, 6:36 a.m.

Warn And Error Errors Encountered By Angular6

## description ``` [Violation] Added non-passive event listener to a scroll-blocking 'mousewhee…

robot18 created at July 7, 2021, 9:46 a.m.

React Error Boundaries

## Error boundaries Starting from react v16, the concept of boundary error has been introduced. …

robot18 created at July 7, 2021, 7:52 a.m.

Solution For Error In Xx From Uglifyjs Keyword «Const»

## description error message: ``` ERROR UglifyJs keyword «const» ``` ## 1\. The easiest …

robot18 created at July 6, 2021, 4:12 p.m.

Mongoerror: E11000 Duplicate Key Error Collection

The batch import of mongoose is abnormal ``` MongoError: E11000 duplicate key error collection:…

robot18 created at July 6, 2021, 6:25 a.m.

Error Typeerror: Cannot Read Property 'Replace' Of Undefined

## description ![error message](/media/image_YVhYJoE.png) Pay attention to the prompts and cl…

robot18 created at July 5, 2021, 5:21 p.m.

Uncaught Error:Bootstrap's Javascript Requires Jquery

## Error description  ``` Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 …

robot18 created at July 5, 2021, 3:16 p.m.

About Error.Capturestacktrace

## introduction In some Node.js programs, you sometimes see the statement `Error.captureStackTra…

robot18 created at July 5, 2021, 7:40 a.m.

Error: Cannot Find Module ‘Commander‘

## description error message ``` Error: Cannot find module 'commander' ``` ## reason …

robot18 created at July 4, 2021, 12:04 p.m.

Error In Callback For Watcher

## problem An error handling problem:  ``` Error in callback for watcher "checkList": "TypeE…

robot18 created at July 3, 2021, 6:06 p.m.

Js Implements A Tag Anchor Point Positioning

``` <a href="#a1">Click</a> <div id="a1">Content content</div> ``` ## Overview The traditi…

robot18 created at July 3, 2021, 2:52 p.m.

A Javascript Error Occured In The Main Process

## error description  ![](/media/image_xn5enb1.png) ## error message ``` A JavaScript err…

robot18 created at June 25, 2021, 4:57 p.m.

Difference Between Websocket And Ajax

### Essentially different ajax, namely **Asynchronous JavaScript and XML**, is a web development…

robot18 created at March 5, 2021, 10:53 a.m.

Summary Of Ways To Loop Through The Arrays In Javascript

This paper compares and summarizes four ways to iterate: ## **for loop:** ```javascript for …

TwoPunch created at March 5, 2021, 9:41 a.m.