The file updates for Docker Compose are not being properly reflected in my volumes

I have set up my docker-compose file and it runs smoothly. However, when I make changes to a file, the modifications do not reflect in the container. As a newcomer to docker, please forgive me if I am using incorrect terminology.

services:
  front:
    build: ./reactualtor
    ports:
      - 3000:3000
    volumes:
      - ./reactualtor:/getting-started-with-docker/front
  api:
    build: ./api
    ports:
      - 4000:4000
    volumes:
      - ./api:/getting-started-with-docker/api

Overview of my folder structure

api
Dockerfile
 src
 index.ts
package.json

front
Dockerfile
 src
 index.ts
package.json

Answer №1

After troubleshooting, it turns out that the issue is not with the docker compose setup but rather with the library ts-node-dev. I discovered that by adding the flag --poll, the problem is resolved and everything runs smoothly.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Tips on incorporating express-mysql-session in a TypeScript project

I'm experimenting with using express-session and express-mysql-session in a Typescript project. Here's the relevant snippet of my code: import * as express from "express"; import * as expressSession from "express-session"; import * as expressMyS ...

The server is unable to process your request to /graphql

I've encountered an issue while setting up the GraphiQL API. I keep receiving the error message "Cannot POST /graphql" on both the screen and network tab of the console. Despite having similar boilerplate code functioning in another project, I'm ...

Exploring the world of WebSockets and Socket.io

Recently many online games, like , have started using WebSockets to create real-time MMORPGs. I'm curious about how to develop a node.js program that can manage connections from browsers using WebSockets. Here is an example of browser code: <!DOC ...

What is the method for incorporating space and line breaks into a regular expression?

Within my HTML file, I have the following code snippet: <div class="col-sm-2 col-sm-offset-1"> <div class="countBox success" id="success"> <h2>467</h2> Passed Tests <span class="glyphicon ...

Unable to access the 'fn' property of undefined in Handlebars causing a TypeError

I encountered an issue with my custom handlebars helper. When I fail to define values for the parameters, I receive the following error message. module.exports = function(src, color, classatr, options) { if (typeof src === 'undefined') src ...

File download is not possible in headless mode but works fine when headless mode is disabled in Puppeteer

Currently, I am utilizing a script that is responsible for logging into a website's authenticated session and initiating the download of an excel file by clicking a button. The interesting issue arises when running the script with headless: true, as t ...

Locating the specific file linked to a live Node.js process ID

Having recently set up a sophisticated enterprise application that utilizes Node.js to serve data, I find myself faced with the challenge of pinpointing the primary server file on a CentOS box. This application comprises multiple node.js applications runni ...

Encountering an incorrect number of parameters for "undefined" during the deployment of a smart contract

I am facing an issue while attempting to deploy my first Voting contract on the testRPC. The error seems to arise from the arguments parameter in the code snippet below. When I tried passing an empty array, it gave an error stating "Got 0 expected 1!". Si ...

Totally at a standstill. (Problem with MongoDB in my MERN stack)

Currently developing an app, focusing on a feature that takes user input and stores it in the database. Although I've implemented this in past projects, I'm facing a persistent issue. Upon user input submission, the data is sent to the backend w ...

"Encountering a 'Your Connection is Not Private' error while using Node

I recently purchased an SSL certificate and encountered an issue with Google Chrome. When I try to access my website, it displays the message 'Your connection is not private NET::ERR_CERT_AUTHORITY_INVALID'. Here are the steps I have taken: const ...

The ajax client is encountering an undefined response, but it is correctly processed when accessed through the

I am in the process of setting up an ajax client with a dummy server for testing purposes. I have successfully resolved the cors issue, but now I am facing a problem where the response from the ajax client is showing as undefined. Interestingly, when I acc ...

Simulated FTP Connection Setup and Error Event in Node.js using Typescript

In my Node-Typescript-Express application, I am utilizing the FTP library to connect and retrieve files from a designated location. As part of creating unit tests, I am focusing on mocking the library to ensure coverage for code handling Ready and Error ev ...

Ignore Express routes with file extensions

My goal is to streamline my routing process with AngularJS without having to duplicate route specifications in both Express and Angular. To achieve this, I set up a "catch all" route as shown below: app.use('/api', api); // handling server-side ...

Enhancing Node.js with the latest updates from GitHub

Currently, I am utilizing node.js to develop a Discord bot. I am planning to change the setup so that my friends can also contribute to its development. One idea I have is to clone a GitHub repository into an existing folder in order to update the current ...

Tips for shuffling the sequence of EJS variables

I am currently working on creating a quiz that consists of multiple choice questions. In order to display the Question, Correct Answer, and 3 other wrong options, I am utilizing EJS variables. The format will be similar to the following example: Question: ...

Guide on implementing findOne for name validation in Node.js using data from MongoDB

Can someone help solve the issue of name duplication and provide guidance on how to execute the codes in Postman API? The attached codes can be found below: *employeemodel.js enter image description here *employeecontroller.js enter image description her ...

Having trouble adding or upgrading packages for your React project?

Struggling with my React project as every time I try to update or install new packages, my computer starts making a lot of noise. It seems to be related to the versions of react-dom and react-router-dom, but I'm unsure how to resolve this without caus ...

Changing the req.path property within an expressjs middleware

I'm currently in the process of developing a middleware that will help eliminate locale strings from the path, such as /de/about becoming /about. This project is being implemented using express. To achieve this, I initially tried out the following mid ...

Utilize an API within a content management system in a Next.js environment

I am having trouble accessing an endpoint in next.js from a headless CMS proxy in Node.js, and I can't seem to make it work properly. Instead of redirecting me to the desired site, I am encountering the following error: If you need assistance, refer ...

How can I upload a file with MeteorJS?

(Originally posted on the Meteor forums) Imagine wanting to transfer a file from one computer to a server powered by Meteor through HTTP when the second computer triggers a specific API. I successfully built an application for this purpose using NodeJS, ...