question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: The results of prepareCache must be produced by glob against workPath

See original GitHub issue

I’m trying to setup Now deployment for our Nuxt project (which builds/starts/runs dev fine) and hitting this error on Now:

----------------- Collect cache -----------------
--
12:58:15 AM | ℹ 0 files collected from .now_cache
12:58:20 AM | ℹ 30855 files collected from node_modules_dev
12:58:22 AM | ℹ 10100 files collected from node_modules_prod
12:58:22 AM | ℹ Collect cache took: 6785.539765 ms
12:58:22 AM | Build completed. Populating build cache...
12:58:22 AM | Error: The results of prepareCache must be produced by glob against workPath or prepareCachePath
12:58:22 AM | at packCache (/var/task/sandbox-worker.js:26382:15)
12:58:22 AM | at uploadCacheStep (/var/task/sandbox-worker.js:26347:28)
12:58:22 AM | at <anonymous>
12:58:22 AM | done

This seems loosely related to https://github.com/nuxt/now-builder/issues/111 but a different error message. This is what our now.json looks like:

{
  "version": 2,
  "builds": [{
    "src": "nuxt/indieshops/nuxt.config.js",
    "use": "@nuxtjs/now-builder",
    "config": {}
  }]
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
danielroecommented, Sep 30, 2019

@vimota Well spotted! With https://github.com/nuxt/now-builder/issues/41#issuecomment-494717072 your repro’s issue is resolved.

Edit: Sorry, I mean that @codeofsumit’s problem is solved.

1reaction
vimotacommented, Sep 30, 2019

Thanks for the help!

Hmm I was having an issue when I tried that (older version of webpack causing vue-loader error) but was able to resolve with an update to webpack and no other issues locally (running the commands you provided), yet still get the internal error with no error logs: https://indieshops-ncdwymbg0.now.sh/.

We are using Firebase so I’m inclined to think it’s the same issue as https://github.com/nuxt/now-builder/issues/41 ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: The results of prepareCache must be produced by glob ...
I'm trying to setup Now deployment for our Nuxt project (which builds/starts/runs dev fine) and hitting this error on Now: ...
Read more >
glob — Unix style pathname pattern expansion ... - Python Docs
The glob module finds all the pathnames matching a specified pattern according to the rules used by the Unix shell, although results are...
Read more >
Unexpected result with recursive glob.glob using '**' pattern
Recursive glob result on non-existing directory: ... there any logical explanation on glob results returned with '**' pattern or just a bug?
Read more >
Understanding the glob pattern in Node.js - LogRocket Blog
In the code above, I imported the glob module, then passed a pattern into the glob function and a callback function that returns...
Read more >
glob - npm
strict When an unusual error is encountered when attempting to read a directory, the process will just continue on in search of other...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found