umijs / dumi

📖 Static Site Generator for component library development
https://d.umijs.org
MIT License
3.55k stars 1.17k forks source link

bug: Cannot read properties of undefined (reading 'directory') #2141

Open steel-li opened 3 months ago

steel-li commented 3 months ago

Version

v2.3.8

OS Version

window11 22631.3672

Node.js Version

v20.14.0

Browser Version

Edge 125.0.2535.92

Link to minimal reproduction

None

Steps to reproduce

  1. mkdir tempDemo && cd tempDemo && npx create-dumi
  2. yarn add vue
  3. yarn add -D @dumijs/preset-vue
  4. yarn start

What is expected?

Can operate normally

What is actually happening?

yarn run v1.22.22 $ npm run dev

tempDemo@0.0.1 dev dumi dev

info - dumi v2.3.8 info - Vue v3.4.27 fatal - TypeError: Cannot read properties of undefined (reading 'directory') at Hook.fn (F:\tempDemo\node_modules\@dumijs\preset-vue\dist\common.js:42:91) at F:\tempDemo\node_modules\@umijs\core\dist\service\service.js:136:38 at _next6 (eval at create (F:\tempDemo\node_modules\@umijs\bundler-utils\compiled\tapable\index.js:1:8410), :85:17) at eval (eval at create (F:\tempDemo\node_modules\@umijs\bundler-utils\compiled\tapable\index.js:1:8410), :110:1) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) fatal - A complete log of this run can be found in: fatal - F:\tempDemo\node_modules.cache\logger\umi.log fatal - Consider reporting a GitHub issue on https://github.com/umijs/umi/issues Done in 3.94s.

Any additional comments? (optional)

None

lifegit commented 1 month ago

+1

lifegit commented 1 month ago

may I ask how to solve this?

jeffwcx commented 1 month ago

may I ask how to solve this?

The previously fixed PR was rolled back due to a bug, so for now, let's define the repository in package.json and then close msfu

lifegit commented 1 month ago

may I ask how to solve this?

The previously fixed PR was rolled back due to a bug, so for now, let's define the repository in package.json and then close msfu

thank you. but i usage scenario is dumi. no existent msfu.

jeffwcx commented 1 month ago

https://d.umijs.org/config#mfsu

lifegit commented 1 month ago

I have tested it but it still failed: dumijs - mfsu

jeffwcx commented 1 month ago

I have tested it but it still failed: dumijs - mfsu

checkout this:https://github.com/jeffwcx/dumi-vue-demo

lifegit commented 1 month ago

thank you!

jeffwcx commented 1 month ago

@lifegit I will fix it as soon as possible

lifegit commented 1 month ago

@lifegit I will fix it as soon as possible

windows system is error: Path contains invalid characters: D:\project.dumi\tmp\plugin-preset-vue:vue3

fatal - Error: Path contains invalid characters: D:\project\.dumi\tmp\plugin-preset-vue:vue3
    at checkPath (D:\project\node_modules\.pnpm\@umijs+utils@4.3.10\node_modules\@umijs\utils\compiled\fs-extra\index.js:1:15482)
    at e.exports.makeDirSync (D:\project\node_modules\.pnpm\@umijs+utils@4.3.10\node_modules\@umijs\utils\compiled\fs-extra\index.js:1:15230)
    at Proxy.fn (D:\project\node_modules\.pnpm\@umijs+preset-umi@4.3.10_@types+node@20.5.1_sass@1.77.8_typescript@5.5.4_webpack@5.93.0\node_modules\@umijs\preset-umi\dist\registerMethods.js:113:28)
    at Hook.fn (D:\project\node_modules\.pnpm\@dumijs+preset-vue@2.3.0_dumi@2.4.7_typescript@5.5.4_vue@3.4.34_webpack@5.93.0\node_modules\@dumijs\preset-vue\dist\vue\techStack\index.js:39:9)
    at D:\project\node_modules\.pnpm\@umijs+core@4.3.10\node_modules\@umijs\core\dist\service\service.js:184:26
    at _next17 (eval at create (D:\project\node_modules\.pnpm\@umijs+bundler-utils@4.3.10\node_modules\@umijs\bundler-utils\compiled\tapable\index.js:1:8410), <anonymous>:51:18)
    at eval (eval at create (D:\project\node_modules\.pnpm\@umijs+bundler-utils@4.3.10\node_modules\@umijs\bundler-utils\compiled\tapable\index.js:1:8410), <anonymous>:76:1) {
  code: 'EINVAL'
}
fatal - A complete log of this run can be found in:
fatal - D:\project\demos\node_modules\.cache\logger\umi.log
fatal - Consider reporting a GitHub issue on https://github.com/umijs/umi/issues
ethan897 commented 1 month ago

@lifegit I will fix it as soon as possible

windows system is error: Path contains invalid characters: D:\project.dumi\tmp\plugin-preset-vue:vue3

fatal - Error: Path contains invalid characters: D:\project\.dumi\tmp\plugin-preset-vue:vue3
    at checkPath (D:\project\node_modules\.pnpm\@umijs+utils@4.3.10\node_modules\@umijs\utils\compiled\fs-extra\index.js:1:15482)
    at e.exports.makeDirSync (D:\project\node_modules\.pnpm\@umijs+utils@4.3.10\node_modules\@umijs\utils\compiled\fs-extra\index.js:1:15230)
    at Proxy.fn (D:\project\node_modules\.pnpm\@umijs+preset-umi@4.3.10_@types+node@20.5.1_sass@1.77.8_typescript@5.5.4_webpack@5.93.0\node_modules\@umijs\preset-umi\dist\registerMethods.js:113:28)
    at Hook.fn (D:\project\node_modules\.pnpm\@dumijs+preset-vue@2.3.0_dumi@2.4.7_typescript@5.5.4_vue@3.4.34_webpack@5.93.0\node_modules\@dumijs\preset-vue\dist\vue\techStack\index.js:39:9)
    at D:\project\node_modules\.pnpm\@umijs+core@4.3.10\node_modules\@umijs\core\dist\service\service.js:184:26
    at _next17 (eval at create (D:\project\node_modules\.pnpm\@umijs+bundler-utils@4.3.10\node_modules\@umijs\bundler-utils\compiled\tapable\index.js:1:8410), <anonymous>:51:18)
    at eval (eval at create (D:\project\node_modules\.pnpm\@umijs+bundler-utils@4.3.10\node_modules\@umijs\bundler-utils\compiled\tapable\index.js:1:8410), <anonymous>:76:1) {
  code: 'EINVAL'
}
fatal - A complete log of this run can be found in:
fatal - D:\project\demos\node_modules\.cache\logger\umi.log
fatal - Consider reporting a GitHub issue on https://github.com/umijs/umi/issues

+++++1 demo不靠谱