1

Today I encounter a problem in my Argon Vue.js project. When I try to run the 'npm run serve' command, I get the following error message:

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

My webpack.config.js file:

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:

{
  "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.

Yoji
  • 11
  • 3
  • what are the steps that you've taken to drill down on this issue? have you tried running this particular module individually? – Coder1991 Dec 28 '20 at 15:06
  • Hi. I had not touched my project for three days. It then worked without problem. When i try to launch the fsevents.node file, it tell me: " The file is not displayed in the editor because it is a binary file or because it uses an unsupported text encoding". – Yoji Dec 28 '20 at 16:52
  • I try to apply this issue: https://stackoverflow.com/questions/64103792/fsevents-causes-module-parse-failed-unexpected-character, but i'm not sure to where and how i have to modify the webpack.config.js – Yoji Dec 28 '20 at 17:01

1 Answers1

0

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.

igsekor
  • 26
  • 2