Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

markbind serve -d does not work with non root directory #1891

Closed
1 task done
tlylt opened this issue Apr 8, 2022 · 1 comment · Fixed by #2044
Closed
1 task done

markbind serve -d does not work with non root directory #1891

tlylt opened this issue Apr 8, 2022 · 1 comment · Fixed by #2044

Comments

@tlylt
Copy link
Contributor

tlylt commented Apr 8, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Any related issues?

No response

Tell us about your environment

Windows 10

MarkBind version

Master branch

What did you do? Describe the bug

While working on the e2e test cases, I needed to run markbind serve test/e2e/test_site. After adding a -d to ensure latest changes are reflected, the site failed to serve at all.

Steps to reproduce

  • Master branch MarkBind is installed properly
  • Have a standard MarkBind site, cd into it
  • Run markbind init temp to create a site in ./temp
  • Running markbind serve -d works to serve the outer MarkBind site
  • Running markbind serve temp -d does not

Expected behavior

The site to serve as per normal

Actual behavior

image

 v3.1.1
error: uncaughtException: ENOENT: no such file or directory, readFile 'C:\Users\User\Documents\GitHub\mb-test\docs/dist/js/vueCommonAppFactory.min.js' date=Fri Apr 08 2022 18:57:08 GMT+0800 (Singapore Standard Time), pid=10640, uid=null, gid=null, cwd=C:\Users\User\Documents\GitHub\mb-test, execPath=C:\Program Files\nodejs\node.exe, version=v14.15.1, argv=[C:\Program Files\nodejs\node.exe, C:\Users\User\AppData\Roaming\npm\node_modules\markbind-cli\index.js, serve, docs, -d], rss=202358784, heapTotal=168906752, heapUsed=142861080, external=3364121, arrayBuffers=677516, 
loadavg=[0, 0, 0], uptime=2064950
MemoryFileSystemError: ENOENT: no such file or directory, readFile 'C:\Users\User\Documents\GitHub\mb-test\docs/dist/js/vueCommonAppFactory.min.js'
    at MemoryFileSystem.readFileSync (C:\Users\User\Documents\GitHub\markbind\node_modules\memory-fs\lib\MemoryFileSystem.js:105:11)
    at Watching.handler (C:\Users\User\Documents\GitHub\markbind\packages\core-web\webpack.dev.js:90:20)
    at C:\Users\User\Documents\GitHub\markbind\node_modules\webpack\lib\Watching.js:99:9
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\User\Documents\GitHub\markbind\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:\Users\User\Documents\GitHub\markbind\node_modules\tapable\lib\Hook.js:154:20)
    at Watching._done (C:\Users\User\Documents\GitHub\markbind\node_modules\webpack\lib\Watching.js:98:28)
    at C:\Users\User\Documents\GitHub\markbind\node_modules\webpack\lib\Watching.js:73:19
    at Compiler.emitRecords (C:\Users\User\Documents\GitHub\markbind\node_modules\webpack\lib\Compiler.js:499:39)
    at C:\Users\User\Documents\GitHub\markbind\node_modules\webpack\lib\Watching.js:54:20
    at C:\Users\User\Documents\GitHub\markbind\node_modules\webpack\lib\Compiler.js:485:14
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\User\Documents\GitHub\markbind\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:\Users\User\Documents\GitHub\markbind\node_modules\tapable\lib\Hook.js:154:20)
    at C:\Users\User\Documents\GitHub\markbind\node_modules\webpack\lib\Compiler.js:482:27
    at C:\Users\User\Documents\GitHub\markbind\node_modules\neo-async\async.js:2818:7
    at done (C:\Users\User\Documents\GitHub\markbind\node_modules\neo-async\async.js:3522:9)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\User\Documents\GitHub\markbind\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)

Anything else?

No response

@tlylt
Copy link
Contributor Author

tlylt commented Jun 19, 2022

This is likely related to #1825 in how the root path is defined and used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants