Tag Archives: front end

[Solved] Error: error:0308010C:digital envelope routines::unsupported

Error: error:0308010C:digital envelope routines::unsupported

After installing npm on the new computer, and then installing yarn through npm, using npm run serve and yarn run serve both report exceptions (complete as shown in the figure)

Error: error:0308010C:digital envelope routines::unsupported

Solution:

Press and hold ctrl to end the current node process and execute in the corresponding directory

set NODE_OPTIONS=--openssl-legacy-provider

[Solved] React Invariant Violation: Minified React error #130

React Invariant Violation: Minified React error #130

The local operation of react is OK. After being packaged, an error is reported as follows:

When you encounter such a problem, usually there is a problem with import, either the name is written wrong, or case, or the imported component does not exist can not be found! Check the import of the problem area carefully and you will usually find the reason.

I encountered the reason is: in the same ts file exported more than one, and then imported elsewhere, the local operation are normal no problem, but after packaging may be due to sub-packaging or what, resulting in other places import place can not be found.

Solution: I wrote a separate file for the exported component, and after the other import references were modified, it was all good.

ERROR [Executor task launch worker for task 30867] NebulaEdgeWriter:52 – failed to write

ERROR [Executor task launch worker for task 30867] NebulaEdgeWriter:52 – failed to write

11:32:16,614 ERROR [Executor task launch worker for task 30867] NebulaEdgeWriter:52 - failed to write INSERT edge `SUPPLIER_AVERAGE_QUOTA`(`four_level_name`,`start_time`,`push_time`,`quote_cycle`) VALUES -7708723366638923441->-7708723366638923441@6325772268643779185: ("Shock Absorber", "2022-05-16 18:25:24", "2022-05-17 09:57:34", "2") for Storage Error: More than one request trying to add/update/delete one edge/vertex at the same time.
11:32:16,614 ERROR [Executor task launch worker for task 30868] NebulaEdgeWriter:52 - failed to write INSERT edge `SUPPLIER_AVERAGE_QUOTA`(`four_level_name`,`start_time`,`push_time`,`quote_cycle`) VALUES -7708723366638923441->-7708723366638923441@6325772268643779185: ("Shock Absorber", "2022-05-16 18:25:24", "2022-05-17 09:57:34", "2") for Storage Error: More than one request trying to add/update/delete one edge/vertex at the same time.
11:32:18,658 ERROR [Executor task launch worker for task 30901] NebulaEdgeWriter:52 - failed to write INSERT edge `SUPPLIER_AVERAGE_QUOTA`(`four_level_name`,`start_time`,`push_time`,`quote_cycle`) VALUES 8524141067397973150->8524141067397973150@-2616939442014903388: ("Color Paint", "2022-01-15 17:11:57", "2022-01-17 17:20:07", "3") for Storage Error: More than one request trying to add/update/delete one edge/vertex at the same time.
11:32:22,097 ERROR [main] NebulaDataSourceEdgeWriter:98 - failed execs:
 List(INSERT edge `SUPPLIER_AVERAGE_QUOTA`(`four_level_name`,`start_time`,`push_time`,`quote_cycle`) VALUES -7708723366638923441->-7708723366638923441@6325772268643779185: ("Shock Absorber", "2022-05-16 18:25:24", "2022-05-17 09:57:34", "2"))
11:32:22,097 ERROR [main] NebulaDataSourceEdgeWriter:98 - failed execs:
 List(INSERT edge `SUPPLIER_AVERAGE_QUOTA`(`four_level_name`,`start_time`,`push_time`,`quote_cycle`) VALUES -7708723366638923441->-7708723366638923441@6325772268643779185: ("Shock Absorber", "2022-05-16 18:25:24", "2022-05-17 09:57:34", "2"))
11:32:22,097 ERROR [main] NebulaDataSourceEdgeWriter:98 - failed execs:
 List(INSERT edge `SUPPLIER_AVERAGE_QUOTA`(`four_level_name`,`start_time`,`push_time`,`quote_cycle`) VALUES 8524141067397973150->8524141067397973150@-2616939442014903388: ("Color Paint", "2022-01-15 17:11:57", "2022-01-17 17:20:07", "3"))

 

Solution: The data should be skewed, add this when partitioning can be

[Solved] Vue-cli Create Project Error: ERROR command failed: yarn

Create a project through vue-cli, and the error ERROR command failed: yarn is reported

reason:

Installed yarn package manager When creating a vue project, you choose to use yarn package manager, but when creating a project through vue-cli, you use npm, causing a conflict

Solution:

The path to open the document is:C:\Users\Administrator\.vuerc

Note: If you don’t see it, check the hidden items at the top in Explorer
Open the folder and replace yarn with npm
Solve the problem and recreate the item

[Solved] 1:1 error Component name “Header“ should always be multi-word vue/multi-word

An error occurred while starting the vue project:

1:1 error Component name “Header” should always be multi-word vue/multi-word

The reason is that the nonstandard code (that is, nonstandard naming) is regarded as an error during the syntax check

Solution:

Add the configuration: lintOnSave: false in the vue.config.js file, as follows:

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false
})

[Solved] Internal Error: EPERM: operation not permitted, open

When installing yarn on nodejs (my version: 16.17), after executing the command: corepack enable, I got an error: Internal Error: EPERM: operation not permitted, open 'Y:\nodejs-v16.17.0-x64\pnpm, The operation is not allowed, I thought of the previous execution of rm -rf /* with linux normal user will also prompt not allowed to execute the operation, and change to root (administrator) account to have higher privileges to execute the command, so I guess it should be the same problem, so I tried to run the cmd command window as administrator, and execute the command: corepack enable again, it succeeded It worked:

Error in nextTick: “TypeError: Cannot set properties of undefined (setting ‘checked‘)“

Error in nextTick: “TypeError: Cannot set properties of undefined (setting ‘checked‘)“

When you see nextTick, do you think of $nextTick?

This is exactly the kind of error that needs to be solved by using $nextTick

Vue performs asynchronously when updating the DOM. As soon as a data change is heard, Vue will open a queue and buffer all the data changes that occur in the same event loop, which means that a value assigned by vue will not take effect immediately, but will be updated when the next event is triggered. callback)

$nextTick is a delayed callback that is executed after the next DOM update loop. If you use $nextTick after modifying the data, you can get the updated DOM in the callback

[Solved] Error in event handler for “el.form.blur“: “RangeError: Maximum call stack size exceeded“

The following errors were encountered during form verification; This error will be reported when you lose focus or click to verify

If you look at the examples in the ElementUI document, you will find that they implement custom rules, setTimeout is used to limit the number of times the rules are called. In your case, once the field has a value (ergo, if is false), your else block will be executed again and again until it exceeds the maximum call stack size. You can solve this problem by restricting calls to custom rules

From: Javascript – understanding why element UI event handlers are triggering rangeerror: maximum call stack size exceeded- Stack Overflow

npm install error code EINTEGRITY sha1 [How to Solve]

npm install error code EINTEGRITY sha1

when other environment codes are packaged into another environment, the NPM install installation dependency reports an error.

13023 error code EINTEGRITY
13024 error sha1-LgxPksfBBzrHtltHrDbWAuirTr8= integrity checksum failed when using sha1: wanted sha1-LgxPksfBBzrHtltHrDbWAuirTr8= but got sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== sha1-stEE/g2Psnz54KHNqCYt04M8bKs=.

Solution:

rm -rf node_modules package-lock.json
npm cache clean --force
npm install --verbose

Error: error:0308010C:digital envelope routines::unsupported [How to Solve]

Error message:

When the front-end project is started (npm run dev) and packaged (npm run build:prod), the following error is reported:

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports 
....
 
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Cause of problem:

The reason for this is that nodeJs V17 released OpenSSL3.0 with stricter restrictions on the algorithm and secret key size, which did not affect versions before nodeJs v17, but this error will occur in V17 and later versions.

Solution (windows only):

Add SET NODE_OPTIONS=--openssl-legacy-provider in the scripts of the package.json 
Before:
"scripts": {
    "dev": "vue-cli-service serve",
    "build:prod": "vue-cli-service build"
  },
  
Added:
"scripts": {
    "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
    "build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build"
  },


Note: If the node version in the team is not the same, do not submit the package.json.
My v18.8.0 does not add this directive, my colleague is v14.17.3, adding this directive will report an error

[Solved] Node Create Express Project Error: Failed to lookup view “error“ in views directory

Node create new Express project prompt an error: Failed to lookup view "error" in views directory

1. Use the EJS engine mode to report an error prompt FaiLED to lookup View “ERROR” in Views Directory

2. Solution
Add error.ejs to Views

<h1><%= message %></h1>
<h2><%= error.status %></h2>
<pre><%= error.stack %></pre>

3. ejstemplate engine needs to be supplemented