tolking / components-helper

Based on the docs to provide code prompt files for vue component library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not compatible with windows

sxzz opened this issue · comments

Error: ENOENT: no such file or directory, open 'C:/XXX\element-plus\dist\element-plus\tags.json'
    at Object.openSync (node:fs:585:3)
    at Object.writeFileSync (node:fs:2153:35)
    at C:\XXX\element-plus\node_modules\.pnpm\components-helper@1.0.4\node_modules\components-helper\lib\index.js:438:12
    at FSReqCallback.oncomplete (node:fs:188:23)
    at FSReqCallback.callbackTrampoline (node:internal/async_hooks:130:17) {
  errno: -4058,
  syscall: 'open',
  code: 'ENOENT',
  path: 'C:/Users\\XXX\\element-plus\\dist\\element-plus\\tags.json'
}

We can modify it to

  const path = path.resolve(options.outDir, options[type])

const path = join(options.outDir, options[type]).replace(/\\/, '/')

@tolking I would be happy to create a PR, if you agree with it.

commented

I will fix it as soon as possible

commented

@sxzz sure welcome. I don’t have a windows PC, I can’t test

windows PC 遇到同样问题,怎么解决呢?

commented

windows PC 遇到同样问题,怎么解决呢?

没有提供详细信息,我无法帮助你。不过你应该先确认是不是同一个问题,和你当前的版本