Tag Archives: View.js

[Solved] Vue cli installation Fastclick Error

When I installed the fastsclick package into the vue-cli dependency today, it reported an error saying

$ npm install fastclick –save
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npm.taobao.org/fastclick failed, reason: getaddrinfo ENOTFOUND registry.npm.taobao.org
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network ‘proxy’ config is set properly. See: ‘npm help config’
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2021-04-15T12_07_17_780Z-debug.log

Eventually switched to a different installation, typing in the command line.

cnpm install fastclick –save
Success

Vue Error: Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location

When I use the route jump, the jump does not work and the browser reports the following error.
Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: “/main”.
createRouterError vue-router.esm.js:2065
createNavigationDuplicatedError vue-router.esm.js:2035
confirmTransition vue-router.esm.js:2328
transitionTo vue-router.esm.js:2260
push vue-router.esm.js:2704
push vue-router.esm.js:3020
push vue-router.esm.js:3019
The reason for the error is that I did not add.

<router-view></router-view>

[Solution] VUE.js Load a local image with parameters in the script

Basic knowledge:
1, VUE.js When loading the local image path in the script, you need to use require, but not in the HTML tag;
2, VUE.js In principle, it is not supported to load the local image path containing parameters. Even if require is used, an error will still be reported because require.js
and
respectively 3. In many cases, we need to take data from the database and compile it, including pictures. In general, in addition to the URL of the network image and the binary image, it may also contain the local image path.

Specific operation:

<template>
  <img :src="imgA"/>
</template>

<script>
export default {
  computed: {
    the name of your function (optional parameter) {
      return require('local folder within some project (aka root)' + arguments)
    }
  },
  methods: {
    your function name2 (optional parameter2) {
      this.imgA = your function name (optional parameter)
    }
  }
}
</script>

Several key points:
1. Functions must be stored in computed, which is a dynamic calculation block. Unlike methods, require contains dynamic parameters and will not report errors;
2 2. A root directory must be provided, and the following parts can be played as you like. The root directory is necessary. During the operation, it will actually get all the files under the root directory, and then find what you need;
3. When calling, assign the function name (optional parameter) of this. You to the image path parameter (IMGA in this example).

If there is any unclear description, please leave a message.

[Solved] MySQL Error: Client does not support authentication protocol requested by server

#Client does not support authentication protocol requested by server; consider upgrading MySQL client

Background: unknown, only my personal situation for reference. The question is not sure if it is related to Noje.js , that is, ES6 is directly related, and whether it is inevitable or not is uncertain Node.js When developing the server, the parameters such as the domain name (localhost), port (3306), user name (root), password, etc. are set correctly, but still an error is reported.

Premise: the computer has installed (1) MySQL (current version 8.0). It is recommended to install (2) MySQL database visualization software, such as Navicat.

#Solution steps:
[solution]
connect to the database (best through third-party software like Navicat or console), and input the following contents:

mysql> ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘New root password’; 

(here “;” please note)

It is recommended to close the running server (if it exists, whether it is successfully started or not), check the new database password, and then restart
refer to stack overflow https://stackoverflow.com/questions/50093144/mysql-8-0-client-does-not-support-authentication-protocol-requested-by-server

#Note:
I don’t quite understand the cause of this problem and how it was solved. So I suggest that you follow the example.
Theoretically, this command only resets the password of root. If the password before and after reset is the same, it should not report an error at the beginning

Please try this solution first, if it is invalid, then consider upgrading MySQL version.

Solution to inaccessibility of Vue cli scaffold project after startup

The problem is as follows: the IP address cannot be accessed

Enter the file “project name – config”- index.js ”Open index.js File, modify parameter

after modification, it can be accessed normally:

If my article is helpful to you, welcome to like, leave a message and pay attention to it. Thank Sanlian!!!
The problem has not been solved!!! 😘😘😘

CSDN: I heard that you are good at playing
GitHub: zhongzhimao
Coupons: coupons

VUE Error: Cannot find module ‘webpack/bin/config-yargs’

For a Vue project downloaded from the Internet, when the terminal executes NPM run dev, an error is reported, as shown in the figure below:

As can be seen from the above error report, webpack cli needs to be installed

Terminal input: NPM install webpack cli

Then execute: NPM run dev OK! It’s ready to run!

NPM install error: gyp err! Configure error

Question:

After the new code is pulled, NPM install reports an error. The error information is as follows:

gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/work/buildqx/vue-admin-template/node_modules/node-sass/.node-gyp'

Error report screenshot:

 

resolvent:

npm install --unsafe-perm

 

After execution, you can download and install related dependencies normally

Syntax error: unexpected token in uni app project compilation

Syntax error: unexpected token in uni app project compilation

Contents of articles

Syntax error: unexpected token error content error reason solution for uni app project compilation

Error content

Originally, it could run well. When it was pulled down and then run to wechat applet, it would report an error, but the web side could run normally~

Module build failed (from ./node_ modules/mini-css-extract-plugin/dist/ loader.js ):

The details are as follows:

Cause of error

None of the solutions found in the search work.

After a careful examination of the code, it is found that the & lt; script & gt; tag appears twice in a newly modified Vue file. The new one is used to describe the style,

Solution

The problem is solved by merging the content in the new & lt; script & gt; into the & lt; style & gt; tag

Note that there can only be three top-level tags in uni app!!

The root of the problem is that the team didn't communicate well, so there was a problem.. But uni app really has a lot of holes!!!!

Error: EBUSY: resource busy or locked

Error: EBUSY: resource busy or locked, LSTAT ‘C:\ swapfile.sys ’。
Here are some effective methods I summarized:

Method 1: delete node_ Module, and then install (NPMI);
method 2: delete node_ Modules, run NPM cache clean or NPM cache clean — force command, and then install;
method 3: upgrade the node version and delete the node_ Modules, and then install it.