Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
Hugo can not find created files by node when using concurrently

I have a node project which I build with concurrently with the following build pipe:

"scripts": {
  "build": "concurrently -g npm:build:*",
  "build:generate-db": "ts-node ./converter/main.ts",
  "build:tailwind": "npx tailwindcss -i ./src/input.css -o ./static/css/build.css --minify",
  "build:hugo": "hugo --minify",
},
  • build: Call's all commands with prefix build in synchron order.
  • build:generate-db: Create .md files for hugo application from a database.
  • build:tailwind: Generates tailwind file and puts it in correct folder
  • build:hugo: Creates hugo website with .md files and tailwind file.

When I run the script hugo is not finding the .md files. When I run the script a second time hugo finds the .md files and create the website correct.

What I tried:

  • First I thought the problem is the time the file write requires (so hugo is trying to find the files before they got written). This is not the case: Even when I sleep 10 seconds after build:generate-db hugo is not able to find the files as well.
  • When I run build:generate-db and than build:hugo it's working.
  • The tailwind file is created correctly. (it's also file write so why is this one working?)
  • When you run the following config it's working:
  "build": "concurrently -g npm:build:* & hugo --minify",
  "build:generate-db": "npm run converter",
  "build:tailwind": "npx tailwindcss -i ./src/input.css -o ./static/css/build.css --minify",

The Converter writes like this:

writeFileSync(`${resultPath}/${data[titleKey]}.md`, JSON.stringify(resultDto, null, 2))

How can I fix this problem?

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!