3

When I change inside index.js file inside auth directory then skaffold stuck on watching for changes... I restarted but every time when I change it stuck

Syncing 1 files for test/test-auth:941b197143f22988459a0484809ee213e22b4366264d163fd8419feb07897d99

Watching for changes...

> auth
   > node_modules
   > src
      > signup
          signup.js
      index.js
   > .dockerignore
   > Dockerfile
   > package-lock.json
   > package.json
> infra
   > k8s
      auth-depl.yaml
      ingress-srv.yaml
> skaffold.yaml

My skaffold.yaml file is

apiVersion: skaffold/v2alpha3
kind: Config
deploy:
  kubectl:
    manifests:
      - ./infra/k8s/*
build:
  local:
    push: false
  artifacts:
    - image: test/test-auth
      docker:
        dockerfile: Dockerfile
      context: auth
      sync:
        manual:
          - src: '***/*.js'
            dest: src

If I make change signup.js or index.js skaffold stuck.Please help me!

1 Answers1

1

Given the output you included above, I suspect that Skaffold is copying the file across:

Syncing 1 files for test/test-> auth:941b197143f22988459a0484809ee213e22b4366264d163fd8419feb07897d99
Watching for changes...

but your app is not set up to respond to file changes. You need to use a tool like nodemon to watch for file changes and restart your app. The Skaffold hot-reload example shows one way to set this up.

Brian de Alwis
  • 2,814
  • 2
  • 18
  • 32