Tag Archives: Npm

[Solved] VUE Error: listen EADDRNOTAVAIL: address not available

VUE Error: listen EADDRNOTAVAIL: address not available

vue Project npm run dev Error: Error: listen EADDRNOTAVAIL: address not available …

Cause: the configured IP address is incorrect.

Solution: open the config folder and find index.js file, modify the value of host to localhost , as shown in the following figure

Error Cannot find module ‘worker_threads‘ [How to Solve]

Error: Cannot find module ‘worker_ ‘threads’ solution

Try vite to create Vue project for the first time, and run NPM run dev with an error

This is a node version problem. Version 12 or above is required

PS D:\qian_duan-learn\vue3-learn\vue3demo02> node -v
v10.13.0
PS D:\qian_duan-learn\vue3-learn\vue3demo02> 

Just upgrade the node version

npm install -g n (mac need to add sudo)
n latest

Of course, it is more recommended that you use NVM to install multiple node versions to meet the requirements of different projects

[Solved] Vue Project Error: Module build failed: Error: Missing binding

Train of thought

Through the error message, we can see that the core problem is that the sass file cannot be found in the dependent file. This prompts us to reinstall sass

1. Switch to the dependent folder of the current project through CD, that is, node_modules file, and then run the command to install sass. The command is as follows

npm rebuild node-sass

2 . Then switch to the project folder and run the command to update it. The command is as follows:

npm update

3. Finally, run the command to start the project

npm run dev

How to Solve screenfull plug-in Error (Version Issues)

We can use handwriting directly to realize the full screen function, but it is very convenient to use the screenfull plug-in to deal with the problem of full screen, but there is a bug in normal use today

Install NPM package NPM i screenfull ,the default is to import the latest version

Import Import screenfull from 'screenfull' to use

You can use the full screen function nomarlly screenfull.toggle()

At this time, I reported an error to me

when the page was blank and could not be loaded, I went to the Internet to find several articles that said the version was too high and needed to reduce the version of the package plug-in. I tried many times and still reported an error

Solution:

It’s really necessary to reduce the version. I’ve reduced it to [email protected] Version, then why do you report an error?I found that the imported path is screenfull under the module directory, but there is no corresponding index.js file

so we have to change the import path import ScreenFull from 'screenfull/dist/screenfull', the page will be displayed normally and the full screen function will be normal

Eclipse Godson Error: Makefile:recipe for target ‘clean‘ failed

report errors

Error in environment when running Godson development in Eclipse:
Godson makefile: 66: recipe for target 'clean' failed
makefile: 66: recipe for target 'clean' failed
makefile: recipe for target 'clean' failed

Error reporting reason

Reason one

Error making when writing kernel module. When the error message “recipe for target XXX” is still displayed after the syntax error and path error of makefile are eliminated, maybe you should doubt the code used by your makefile. (if your makefile is copied directly from the Internet, first use the WordPad under the window to see if there is any garbled code. The garbled code of “space” is likely to lead to your error)

reason

If you do not run as an administrator under windows10 system, the above error will be reported

Solution:

Run eclipse as an administrator and run the files will be OK!

[Solved] Syntax Error: Error: Node Sass does not yet support your current environment: Windows 64-bit with

Syntax error: error: node sass does not yet support your current environment: Windows 64 bit with unsupported runtime (93)

Detailed error reporting is shown in the figure:

reason:

Node-sass does not support high versions of node.
my version is 16.14.2

and the node-sass version supports as shown in the figure:

windows only supports 14 versions at most.

Solution:

    1. reinstall node version 14.
    1. Use NVM for node version management and change the node version to 14.

effect

As shown in the figure, after changing to version 14.19.1, it starts normally

[Solved] npm Install vuex Error: npm ERR! code ERESOLVE

Question

The following error is reported when NPM install vuex — save is used on the command line

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/vue
npm ERR!   [email protected]"^2.5.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer [email protected]"^3.0.2" from [email protected]
npm ERR! node_modules/vuex
npm ERR!   [email protected]"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See C:\Users\admin\AppData\Local\npm-cache\eresolve-report.txt for a full repor
t.

This problem occurs because the version of NPM is too high

Solution:

Install the specified version of vuex
view the installable version of vuex

C:\Users\admin>npm view vuex versions --json
[
  "0.1.0",
  "0.2.0",
  "0.3.0",
  "0.4.0",
  "0.4.1",
  "0.4.2",
  "0.5.0",
  "0.5.1",
  "0.6.1",
  "0.6.2",
  "0.6.3",
  "0.7.0",
  "0.7.1",
  "0.8.0",
  "0.8.1",
  "0.8.2",
  "1.0.0-rc",
  "1.0.0-rc.2",
  "1.0.0",
  "1.0.1",
  "2.0.0-rc.1",
  "2.0.0-rc.3",
  "2.0.0-rc.4",
  "2.0.0-rc.5",
  "2.0.0-rc.6",
  "2.0.0",
  "2.1.0",
  "2.1.1",
  "2.1.2",
  "2.1.3",
  "2.2.0",
  "2.2.1",
  "2.3.0",
  "2.3.1",
  "2.4.0",
  "2.4.1",
  "2.5.0",
  "3.0.0",
  "3.0.1",
  "3.1.0",
  "3.1.1",
  "3.1.2",
  "3.1.3",
  "3.2.0",
  "3.3.0",
  "3.4.0",
  "3.5.0",
  "3.5.1",
  "3.6.0",
  "3.6.1",
  "3.6.2",
  "4.0.0-alpha.1",
  "4.0.0-beta.1",
  "4.0.0-beta.2",
  "4.0.0-beta.3",
  "4.0.0-beta.4",
  "4.0.0-rc.1",
  "4.0.0-rc.2",
  "4.0.0",
  "4.0.1",
  "4.0.2"
]

Install the specified version of vuex

npm install [email protected] --save

[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 in package.json.


Solution:

Delete the webpack and reinstall the previous version
npm uninstall webpack
npm install [email protected]^4.0.0 –save-dev

[Solved] NPM Start Project Error: ‘Error: error:0308010C:digital envelope routines::unsupported’

Reason: the version of node is higher than 16, the version of the project is not higher than 16, and OpenSSL is updated after node17.

Solution:

Method 1:

Modify the environment variable at the command line: $env:NODE_OPTIONS="--openssl-legacy-provider"
In the start project: yarn start
Method 2.
Use nvm to modify the node to a version no higher than 16

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",
 },

[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