Build error - Cannot find module 'uc.micro/categories/P/regex'


I have this project using Gulp + Pug, that I’m updating old *.pug files to *.md files, so I can work with Netlify CMS.

In Pug, you can use Filters/Plugins to include and compile other language files, using JSTransformer modules.
Here’s the example I’m working with:


In my local environment everything works as expected, but it throws an error in Netlify build.
Here’s the log:

Plumber found unhandled error: Error in plugin "gulp-pug"
Message: Cannot find module 'uc.micro/categories/P/regex'
Details: code: MODULE_NOT_FOUND

If I remove the Filters/Plugins from the include, Netlify doesn’t throw an error, but I don’t get the markdown compile I need.
Link to Pug documentation: Filters – Pug

What should I do to fix this error?


Hi, can you share a link to your repo so I can see how you have it setup and your build process? My immediate guess is that you aren’t bundling in or zipping all the dependencies you need (this can be done during the build).

Hey @futuregerald,

Thanks for your reply!
This is the repo, admin-test branch: GitHub - podrivo/movimentoux at admin-test


I think this is the important message. Are you aware that our build filesystem is case sensitive? That capital P, if hardcoded in your file, is unlikely to match to the likely-all-lowercase storage that git, npm, and company all default to. But directories “/p” and “/P” are different here, during build.

Hey @fool,

I wasn’t aware of that, but that’s not the case here.
I don’t have anything coded regarding this module.
You can check more details here in my repo: GitHub - podrivo/movimentoux at admin-test

Here’s my package.json:

  "name": "movimentoux",
  "version": "1.0.0",
  "description": "Movimento UX é um podcast de entrevistas sobre o universo de Experiência do Usuário.",
  "main": "gulpfile.js",
  "repository": "",
  "author": "Pedro Ivo Hudson <> (",
  "license": "MIT",
  "scripts": {
    "start": "gulp default",
    "build": "gulp build"
  "dependencies": {
    "autoprefixer": "^9.6.5",
    "browser-sync": "^2.26.7",
    "del": "^5.1.0",
    "gulp": "^4.0.2",
    "gulp-clean-css": "^4.2.0",
    "gulp-concat": "^2.6.1",
    "gulp-embed-svg": "^1.1.5",
    "gulp-eslint": "^6.0.0",
    "gulp-imagemin": "^6.1.1",
    "gulp-merge-media-queries": "^0.2.1",
    "gulp-plumber": "^1.2.1",
    "gulp-postcss": "^8.0.0",
    "gulp-pug": "^4.0.1",
    "gulp-sass": "^4.0.2",
    "gulp-sass-glob": "^1.1.0",
    "gulp-sass-lint": "^1.4.0",
    "gulp-sitemap": "^7.6.0",
    "gulp-uglify": "^3.0.2",
    "gulp4-run-sequence": "^1.0.0",
    "imagemin-mozjpeg": "^8.0.0",
    "jstransformer-markdown-it": "^2.1.0",
    "markdown-it-attrs": "^3.0.1"
  "browserslist": [
    "last 2 version"

Any suggestions?

It seems that uc.micro is a dependency of markdown-it-attrs. You could try removing your package-lock.json file and running npm install again to re-create the file and hopefully update nested dependencies. Let me know if it helps.