Tag Archives: front end

css-rcurlyexpected Error: css-rcurlyexpected at-rule, or selector expected, Do not use empty rulesets

● questions:

● the errors are:

css-rcurlyexpected
at-rule or selector expected
Do not use empty rulesets

But the style works normally.

● cause

1. set “vetur.validation.style”: false in setting.json,
2. add @charset “utf-8” to the first line of style;
But the main reason for this is that the page language mode is set incorrectly, just use the default .vue will be set to html mode, so it will report an error

● Solution 1:

Click in to change to Vue mode

● Solution 2:

Set the setting in setting.json to allow the system to modify the language mode of the .vue file to vue by default

"files.associations": {
   "*.vue": "vue",
 },

How to Solve Vue3 jweixin-module Error

Use in vue3:

var jweixin = require('jweixin-module');

It will be compiled with the error: require is not defined, there is no require module, change to import, because jweixin-module does not support export writing, so the introduction can not succeed.

Solution:
Use a third-party wrapper jdk: weixin-js-sdk

npm install weixin-js-sdk -S

import jweixin from 'weixin-js-sdk'

Uniapp Use vant Weapp icon Module Error [How to Fix]

1. Abnormal information

11:43:21.725 Module build failed (from ./node_modules/postcss-loader/src/index.js):
11:43:21.725 SyntaxError
11:43:21.735 (36:10521) Unclosed bracket
11:43:21.736   34 | 
11:43:21.741   35 | 
11:43:21.742 > 36 | @import '../common/index.css';.van-icon{text-rendering:auto;-webkit-font-smoothing:antialiased;font:normal normal normal 14px/1

 

Solution:

Modify /wxcomponents/vant/icon/index wxss

The following figure in the format (“woff2”) after the url in front of a space, you need to modify two places

[Solved] Found bindings for the following environments

When running the previously written vue project, I encountered the following error.
It should be caused by incompatible version upgrade
Error:

Module build failed: ModuleBuildError: Module build failed: Error: Missing binding E:\SVN\32IDPW\04-project\03-source\02-web\briefing\node_modules\node-sass\vendor\win32-x64-64\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 10.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 8.x

 

Solution:

npm rebuild node-sass

npm update

npm run dev

[Solved] Syntax Error: Error: Node Sass does not yet support your current environment:

Error Messages:

 ERROR  Failed to compile with 1 error                                               AM11:47:18
error  in ./src/assets/styles/fat.scss
Syntax Error: Error: Node Sass does not yet support your current environment: Windows 64-bit withFor more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1

@ ./src/assets/styles/fat.scss 4:14-291 15:3-20:5 16:22-299
@ ./src/main.js
@ multi ./node_modules/[email protected]@webpack-dev-server/client?http://192.168.30.251:80&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

Solution:

 The node scss version does not match the current environment and needs to be uninstalled and reinstalled
Uninstall command: npm uninstall –save node-sass
Install command: npm install –save node-sass

[Solved] echarts Draw Errror: echarts-d9fd185e.js:31447 Uncaught (in promise) Error: Initialize failed: invalid dom.

When the browser executes document.getElementById(‘chart’), because the dom object with the id of main has not been created, it reports an error Initialize failed: invalid dom.

The solution is to delay the execution of the code for initializing the charts in echarts, which is fast and does not affect the display of the effect and does not feel stuck.

func.echarts() for the initialization of the chart function , code and effects are as follows (a vue3.0 project of a page used)

     echarts: () => {
        let myChart = echarts.init(document.getElementById("chart"));
        let option = {
          title: {
            text: '标题',
            textStyle: {
              fontSize: 13
            },
          },
          toolbox: {
            show: true,
            feature: {
              saveAsImage: {
                show: false
              }
            },
          },
          legend: {
            data: ['人数']
          },
          xAxis: {
            data: ['09-14', '09-15', '09-16', '09-17', '09-18', '09-19', '09-20']
          },
          yAxis: {},
          series: [{
            name: '人数',
            type: 'line',
            data: ['13', '14', '18', '14', '10', '11', '9'],
          }]
        };
        myChart.setOption(option);
      },
    })

[Solved] Uncaught Error: Highcharts error #16

Highcharts error #16 is due to duplicate Highcharts definitions. The reason for this error is that the namespace of Highcharts is duplicated.

The namespace of Highcharts actually exists in the Highcharts.js file that we refer to when we use Highcharts.

Solution
Remove the Highcharts.js from the nested subpages and leave only the reference to the main page, and the error will not be reported.

Conclusion
Referencing Highcharts.js on the main page and referencing Highcharts.js on the sub-page nested in it will cause duplicate Highcharts definitions whenever the sub-page is loaded.

[Solved] Error Rule can only have one resource source (provided resource and test + include + exclude)

Error: Rule can only have one resource source
(provided resource and test + include + exclude)

Error: Rule can only have one resource source (provided resource and test + include + exclude)

Error: Rule can only have one resource source (provided resource and test + include + exclude) in
 "exclude": [
    null
  ],
  "use": [
    {
      "loader": "/Users/juanpablo/front-treatments/node_modules/cache-loader/dist/cjs.js",
      "options": {
        "cacheDirectory": "/Users/juanpablo/front-treatments/node_modules/.cache/babel-loader",
        "cacheIdentifier": "81fef5a6"
      },
      "ident": "clonedRuleSet-38[0].rules[0].use[0]"
    },
    {
      "loader": "/Users/juanpablo/front-treatments/node_modules/babel-loader/lib/index.js",
      "options": "undefined",
      "ident": "undefined"
    }
  ]
} ````
A complete log of this run can be found in:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/Users/juanpablo/.nvm/versions/node/v12.19.0/bin/node',
1 verbose cli   '/Users/juanpablo/.nvm/versions/node/v12.19.0/bin/npm',
1 verbose cli   'run',
1 verbose cli   'serve'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle [email protected]~preserve: [email protected]
6 info lifecycle [email protected]~serve: [email protected]
7 verbose lifecycle [email protected]~serve: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~serve: PATH: /Users/juanpablo/.nvm/versions/node/v12.19.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/juanpablo/front-treatments/node_modules/.bin:/Users/juanpablo/.nvm/versions/node/v12.19.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/juanpablo/.rvm/bin
9 verbose lifecycle [email protected]~serve: CWD: /Users/juanpablo/front-treatments
10 silly lifecycle [email protected]~serve: Args: [ '-c', 'vue-cli-service serve' ]
11 silly lifecycle [email protected]~serve: Returned: code: 1  signal: null
12 info lifecycle [email protected]~serve: Failed to exec serve script
13 verbose stack Error: [email protected] serve: `vue-cli-service serve`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/Users/juanpablo/.nvm/versions/node/v12.19.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:314:20)
13 verbose stack     at ChildProcess.<anonymous> (/Users/juanpablo/.nvm/versions/node/v12.19.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:314:20)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/juanpablo/front-treatments
16 verbose Darwin 19.6.0
17 verbose argv "/Users/juanpablo/.nvm/versions/node/v12.19.0/bin/node" "/Users/juanpablo/.nvm/versions/node/v12.19.0/bin/npm" "run" "serve"
18 verbose node v12.19.0
19 verbose npm  v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] serve: `vue-cli-service serve`
22 error Exit status 1
23 error Failed at the [email protected] serve script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Cause analysis:

Webpack version conflict issue in package.json.


Solution:

Delete the webpack and reinstall the previous version
npm uninstall webpack
npm install webpack@^4.0.0 –save-dev

How to Solve Chrome Error: “ERR_HTTP2_PROTOCOL_ERROR”

Practical application items: http://github.crmeb.net/u/long

Solution:

  • open chrome://flags/ page
  • find Block insecure private network requests. and Enable Trust Tokenstwo
  • Change its value from Default to Enable
  • Click the ReLaunch button restart the browser
  • Reopen the website that reported the error
  • If it doesn’t open, enter chrome://restart/ it in the address bar and restart the browser.

[Vue warn]Error in mounted hook: “Error: please transfer a valid prop path to form item“

This article mainly explains the error reporting and solution of nested El table in El form

report errors

[Vue warn]: Error in mounted hook: "Error: please transfer a valid prop path to form item!"

Error reporting reason

The reason for the error is that the prop definition does not use the array name tabledata bound by table

Solution:

Prop uses the array name tabledata bound by table