Error: ENOTDIR: not a directory
when using "layouts/Layout.vue" as entry file
#1563
Closed
1 task done
Bug report
Version
vuepress: 1.0.0-alpha.47
Steps to reproduce
What is expected?
When I set the
"main"
field tolayouts/Layout.vue
inpackage.json
as what the docstell me to do, I can build my package successfully.
What is actually happening?
vuepress/packages/@vuepress/core/lib/node/loadTheme.js
Lines 56 to 75 in 41b5cfb
function
normalizeThemePath
return'xxxx/package.json'
becausefromDep===true
andmain==="layouts/Layout.vue"
in my case and casue the error below.If I change
return packageRoot
intoreturn parse(require.resolve(name)).dir
, this issue will not occur.Other relevant information
The text was updated successfully, but these errors were encountered: