Home

Issue: 1292

Error: One of the glob patterns doesn't match any files

[issue link]

About 80% of the time when I run nuxt build or generate I get the error referred below. I get that error in brand new linux boxes in the cloud, as well as on my local Mac. The weird part is that sometimes, if I wait a few minutes and then run the command again, it works fine for no apparent reason.

You can try to replicate the error by cloning the DEV branch of one of my repos:

https://github.com/fabionolasco/fabionolasco.com/tree/dev

> nuxt build

  nuxt:build Building... +0ms
  nuxt:build App root: /fabio/fabionolasco.com +1s
  nuxt:build Generating /fabio/fabionolasco.com/.nuxt files... +0ms
  nuxt:build Generating files... +8ms
  nuxt:build Generating routes... +7ms
  nuxt:build Building files... +66ms
  build [==========          ] 50%Error: One of the glob patterns doesn't match any files. Please remove or fix the following: {
  "globDirectory": "/fabio/fabionolasco.com/.nuxt/dist",
  "globPattern": "**/*.{js,css}",
  "globIgnores": [
    "node_modules/**/*",
    "../../static/workbox-sw.prod.v1.1.0.js",
    "../../static/sw.js"
  ]
}
    at module.exports.err (/fabio/fabionolasco.com/node_modules/workbox-build/build/lib/utils/get-file-details.js:20:11)
    at globPatterns.reduce (/fabio/fabionolasco.com/node_modules/workbox-build/build/lib/get-file-manifest-entries.js:120:32)
    at Array.reduce (native)
    at getFileManifestEntries (/fabio/fabionolasco.com/node_modules/workbox-build/build/lib/get-file-manifest-entries.js:119:36)
    at copyWorkboxSW.then.then (/fabio/fabionolasco.com/node_modules/workbox-build/build/lib/generate-sw.js:150:12)
This question is available on Nuxt.js community (#c1143)