简体   繁体   English

Vue-CLI 项目中的“/node_modules/fsevents/fsevents.node 中的错误”

[英]“Error in ./node_modules/fsevents/fsevents.node” in Vue-CLI project

Today I encounter a problem in my Argon Vue.js project.今天在我的 Argon Vue.js 项目中遇到了一个问题。 When I try to run the 'npm run serve' command, I get the following error message:当我尝试运行“npm run serve”命令时,我收到以下错误消息:

ERROR Failed to compile with 1 errors 15:36:11 error in./node_modules/fsevents/fsevents.node错误无法编译,出现 1 个错误 15:36:11 错误 in./node_modules/fsevents/fsevents.node

My webpack.config.js file:我的 webpack.config.js 文件:

let service = process.VUE_CLI_SERVICE

if (!service || process.env.VUE_CLI_API_MODE) {
  const Service = require('./lib/Service')
  service = new Service(process.env.VUE_CLI_CONTEXT || process.cwd())
  service.init(process.env.VUE_CLI_MODE || process.env.NODE_ENV)
}

module.exports = service.resolveWebpackConfig()

My package.json file:我的 package.json 文件:

{
  "name": "vue-argon-design-system",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "bindings": "^1.5.0",
    "bootstrap-vue": "^2.0.4",
    "flatpickr": "^4.5.1",
    "jquery": "^3.5.1",
    "module": "^1.2.5",
    "node-sass": "^4.14.1",
    "nouislider": "^11.1.0",
    "register-service-worker": "^1.5.2",
    "vue": "^2.6.6",
    "vue-flatpickr-component": "^8.1.1",
    "vue-lazyload": "^1.2.6",
    "vue-router": "^3.0.2",
    "vue2-transitions": "^0.2.3"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.4.0",
    "@vue/cli-plugin-eslint": "^3.4.0",
    "@vue/cli-plugin-pwa": "^3.4.0",
    "@vue/cli-service": "^3.4.0",
    "fsevents": "^2.1.3",
    "node-loader": "^1.0.1",
    "sass-loader": "^7.3.1",
    "vue-template-compiler": "^2.6.6",
    "webpack": "^4.44.2"
  }
}

The full error message:完整的错误信息:

 ERROR  Failed to compile with 1 errors                                                                                                                                                                                              16:12:36
 error  in ./node_modules/fsevents/fsevents.node

Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

 @ ./node_modules/fsevents/fsevents.js 13:15-41
 @ ./node_modules/chokidar/lib/fsevents-handler.js
 @ ./node_modules/chokidar/index.js
 @ ./node_modules/watchpack/lib/chokidar.js
 @ ./node_modules/watchpack/lib/DirectoryWatcher.js
 @ ./node_modules/watchpack/lib/watcherManager.js
 @ ./node_modules/watchpack/lib/watchpack.js
 @ (webpack)/lib/node/NodeWatchFileSystem.js
 @ (webpack)/lib/node/NodeEnvironmentPlugin.js
 @ (webpack)/lib/webpack.js
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://192.168.1.151:8082/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

Despite research, I still cannot resolve this one.尽管进行了研究,但我仍然无法解决这个问题。 Does anyone have a proposition for me?有人对我有提议吗? thank you in advance.先感谢您。

It isn't ready to fix this error directly.它还没有准备好直接修复这个错误。 Developers should fix this error in the library.开发人员应在库中修复此错误。 You could use -f or --force key to install all dependences force without any warnings.您可以使用-f--force key来安装所有依赖项 force 而不会发出任何警告。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM