Questions tagged [chokidar]

Node.js library for the cross-platform files watching. Used by gulp, browser-sync and webpack.

Node.js library for the cross-platform files watching. Used by gulp, browser-sync and webpack.

81 questions
3
votes
1 answer

Nodejs Printing fs.readfile data after chokidar's watcher.on('change) returns an empty string

I am trying to read the file whenever it changes. The file change is a webpack output. It is giving inconsistent results where it is returning an empty string even when the changed file is not emtpy. I have attached the screenshot of the logs. var…
Abhicoding
  • 115
  • 1
  • 7
2
votes
0 answers

import 'react-quill/dist/quill.snow.css' is not working

The terminal will no longer display the product and instead says this:- Failed to compile. ./src/components/Post.js Module not found: Can't resolve 'react-quill/dist/quill.snow.css' in…
2
votes
3 answers

How to detect changes in the contents of a file, using Regex and Chokidar

I would like to run a JS function when a specific section of a file changes. The contents that are being watched should be selected by Regex. As far as I have seen, libraries like Chokidar can only detect changes to a file directly and do not…
2
votes
1 answer

npm chokidar firing event twice

I'm using the NPM package chokidar to watch for the new files. I want to execute a function whenever a new file is created or an existing file is updated. The problem is whenever a new file is created the chokidar NPM package fires 2 events that are…
Amarjit Singh
  • 2,068
  • 19
  • 52
2
votes
0 answers

Laravel mix watch ignore multiple folders using watchOptions

Using Laravel Mix 6 trying to disable changes to /resources/view from rebuilding resources. ignored (anymatch-compatible definition) Defines files/paths to be ignored. The whole relative or absolute path is tested, not just filename. If a function…
John Magnolia
  • 16,769
  • 36
  • 159
  • 270
2
votes
0 answers

Electron JS watch large set of files efficiently

I am creating an electron js application where I want to sync the files recursively in the directories that are configured by the user. The following is currently implemented in the application When the app boots, use chokidar to get the initial…
tbhaxor
  • 1,659
  • 2
  • 13
  • 43
2
votes
1 answer

React application npm error code ELIFECYCLE

Getting below in my react application. I have tried reinstallation of node_module, setting environment variable C:\Windows\System32 { "name": "my_app", "version": "0.1.0", "private": true, "dependencies": { "@testing-library/jest-dom":…
sakshi malik
  • 88
  • 1
  • 7
2
votes
1 answer

Error from chokidar while using react-aad-msal

I am working with azure active directory and I get this weird module not found error followed by a chokidar error : ./node_modules/react-aad-msal/dist/commonjs/MsalAuthProvider.js Module not found: Can't resolve 'msal' in…
2
votes
1 answer

Error from chokidar after reinstalling np,

I have a recurring issue with npm start. First, it seems that every time after I removed everything in the src folder I will not be able to run npm start -- it will throw an error at start script. I have been solving that problem with deleting…
Eddie Lam
  • 579
  • 1
  • 5
  • 22
2
votes
3 answers

how to ignore files within subdirectories using chokidar

I have this directory structure ├── components │ ├── quarks │ │ └── index.js │ │ └── ... │ ├── bosons │ │ └── index.js │ │ └── GridLayout.vue │ │ └── ... │ ├── atoms │ │ └── ButtonStyle.vue │ │ └── InputStyle.vue │…
Yung Silva
  • 1,324
  • 4
  • 20
  • 40
2
votes
1 answer

Node watch on a docker-compose volume does not register delete events

I have a simple Node.js HTTP server running inside a docker container. One of the basic structural folders uses volume from docker-compose.yml to mirror the host and container directory. Within the Node server, I have a watcher set up to track…
Zfalen
  • 878
  • 6
  • 20
2
votes
1 answer

Transpiling ES6 and launching Express app upon file change

I'm developing an Express app. The code uses ES6 import statements, so it needs to be transpiled by Babel in ES5 code so it can be run with Node. The ES6 source code is stored in my src directory, and the compiled code is placed in my dest…
mario_sunny
  • 1,412
  • 11
  • 29
2
votes
0 answers

File info of deleted file and file timestamps in node, chokidar

I have started learning node file system and have created a simple file app using websocket, chokidar and node. I am trying to show the files activity in current directory and it's working fine when I modified somet files but with couple of…
kp singh
  • 1,430
  • 8
  • 21
2
votes
0 answers

Syncronize files using fs-extra and Chokidar node.js

I am new to node.js in general and trying to monitor a file directory using chokidar below code is working fine but now what I want to achieve is when the file is or directory has changed a function will run and copy the files into a folder. I am…
Sarotobi
  • 707
  • 1
  • 9
  • 28
1
vote
0 answers

Vite hot reloading does not work anymore if using new IntelliJ IDEA 2023 version

I am experiencing an issue with the usage of Hot Reload in Vite Server when using the latest version of IntelliJ IDEA. The version of Vite is 4.3.8. The version of IntelliJ IDEA is Build #IU-231.8109.175, built on March 28, 2023. The operating…
shogitai
  • 1,823
  • 1
  • 23
  • 50