vuepress: No such file: `node_modules/@vuepress/core/.temp/app-enhancers/global-components-2.js`

  • I confirm that this is an issue rather than a question.

Bug report

In development mode it sometimes breaks down when incrementally compiling the changes and I get this error in the browser console:

[WDS] Errors while compiling. Reload prevented.

./node_modules/@vuepress/core/.temp/app-enhancers/global-components-2.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: ENOENT: no such file or directory, open '/<path to project>/node_modules/@vuepress/core/.temp/app-enhancers/global-components-2.js'

The build output in the terminal does not report any errors, and will happily recompile further changes, but nothing will happen in the browser.

Steps to reproduce

  • vuepress dev src
  • Make some changes to files, have noticed it both when making changes to content and theme.
  • It works maybe 80-90% of the time, but once the error happens, saving again doesn’t fix it and i have to ctrl-c and start the development server again.

I am sorry for not providing a minimal example, but I truly have no clue which part of my code/setup is causing this. I am using a custom theme and VueX, but the issue started appearing before setting up VueX.

What is expected?

A normal incremental compile + hot reload.

What is actually happening?

The error pasted above.

Other relevant information

(I am running this via WSL, which is probably why it doesn’t report my browsers)

  • Output of npx vuepress info in my VuePress project:
Environment Info:

  System:
    OS: Linux 4.4 Ubuntu 18.04.4 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
  Binaries:
    Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
    Yarn: 1.19.1 - ~/.yarn/bin/yarn
    npm: 6.14.3 - ~/.nvm/versions/node/v10.15.0/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    @vuepress/core:  1.4.0
    @vuepress/theme-default:  1.4.0
    vuepress: ^1.3.0 => 1.4.0
  npmGlobalPackages:
    vuepress: Not Found

Other than this issue, I really really like using VuePress so far, keep up the great work!

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 28
  • Comments: 34 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Sorry for delay. The fix is available in 1.8.0

I’m having the same issue.

I had the same issue, mitigated by specifying a different temp folder.

"dev": "vuepress dev docs --temp .temp",

Not sure why though

Having the same issue, it’s a bit annoying when hot reloading stops working

Did anybody found a solution to this ? I’m having the very same issue.

@alex-outsourci It also works well with pre v1.0.0 versions.

I tried deleting node_modules and package-lock.json and it solved my problem. I don’t know whether it’s recommended or not. But it just solved 😃

Hitting the same issue very frequently with the Rundeck Docs.

@afkoziol Our documentation repo is public, and fails quite consistently for me. Can you reproduce it there?

Yup! I was able to repro it very easily. Ran the dev server, renamed one of the second level headers and it failed.

Reinstalling the latest version of vuepress fixed it for me

The initial build works fine for me, but I get this as soon as I make any incremental change to the theme. Errors in the browser:

image

Environment Info:

  System:
    OS: Linux 4.15 Ubuntu 18.04.3 LTS (Bionic Beaver)
    CPU: (2) x64 Intel(R) Xeon(R) CPU E5-2630L v2 @ 2.40GHz
  Binaries:
    Node: 12.10.0 - /tmp/yarn--1586344987626-0.24074515643434302/node
    Yarn: 1.21.1 - /tmp/yarn--1586344987626-0.24074515643434302/yarn
    npm: 6.10.3 - ~/.asdf/installs/nodejs/12.10.0/bin/npm
  Browsers:
    Chrome: 80.0.3987.149
    Firefox: Not Found
  npmPackages:
    @vuepress/core:  1.4.0
    @vuepress/theme-default:  1.4.0
    vuepress: ^1.4.0 => 1.4.0
  npmGlobalPackages:
    vuepress: Not Found