Closed dsq3033 closed 4 years ago
Please follow contribution guidelines and DO NOT remove issue template.
I meet the same question. How to solve it? time : 2020-10-4 22:53:57 I do the action like the vuepress official guide. But build to the same bug.
npm run docs:dev is good ! But run docs:build cause to a error !!!
Error: Cannot find module 'D:\Personal\Desktop\vuepress-starter\docs\.vuepress\dist\manifest\client.json'
Require stack:
- D:\Personal\Desktop\vuepress-starter\node_modules\@vuepress\core\lib\node\build\index.js
- D:\Personal\Desktop\vuepress-starter\node_modules\@vuepress\core\lib\node\App.js
- D:\Personal\Desktop\vuepress-starter\node_modules\@vuepress\core\lib\index.js
- D:\Personal\Desktop\vuepress-starter\node_modules\vuepress\lib\registerCoreCommands.js
- D:\Personal\Desktop\vuepress-starter\node_modules\vuepress\cli.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Build.render (D:\Personal\Desktop\vuepress-starter\node_modules\@vuepress\core\lib\node\build\index.js:56:28)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async App.build (D:\Personal\Desktop\vuepress-starter\node_modules\@vuepress\core\lib\node\App.js:499:5)
Hi, bro. During one day , I finally solve the problem. Just configure environment variable . set Node_ENV = production . And restart the computer. You will build with no error.
兄弟 你是真牛逼 但还是想知道为啥配置环境变量就可以了
it works for me when I remove NODE_ENV in dockerfile
环境是 win10
就按照官方文档快速上手的流程创建完README.md之后dev没有问题 但是build的时候就会报错 Error: Cannot find module 'G:\study\docs.vuepress\dist\manifest\client.json' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Build.render (G:\study\node_modules\@vuepress\core\lib\node\build\index.js:56:28) at process._tickCallback (internal/process/next_tick.js:68:7)