didi / epage

一款基于schema的低代码可视化页面配置工具
http://epage.didichuxing.com
MIT License
460 stars 94 forks source link

epage-cli 初始化一个项目 #9

Open Protagonistss opened 3 years ago

Protagonistss commented 3 years ago

Describe the bug TypeError: Cannot read property 'replace' of undefined at ReadFileContext.callback (/Users/huangshan/.config/yarn/global/node_modules/epage-cli/bin/epage.js:64:10) at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:237:13)

To Reproduce Steps to reproduce the behavior: 1、yan global add epage-cli 2、epage init explore-widgets

Expected behavior 执行 epage init explore-widgets 希望可以创建成功

Desktop (please complete the following information):

tt-ghost commented 3 years ago

@Protagonistss 1、yarn global add epage-cli 执行有报错什么错误么? 2、尝试 npm i -g epage-cli是否能安装成功?

然后 epage init explore-widgets

Protagonistss commented 3 years ago

@Protagonistss 1、yarn global add epage-cli 执行有报错什么错误么? 2、尝试 npm i -g epage-cli是否能安装成功?

然后 epage init explore-widgets

我确认了一下 1、yarn 安装的时候没有出现任何error,初始化的时候会出现上述问题。 2、npm i epage-cli -g 安装出现了一下问题,不知是否有影响

husky@4.3.0 install /usr/local/lib/node_modules/epage-cli/node_modules/husky node husky install

husky > Setting up git hooks Can't find package.json in /Users/huangshan directory or parents Please check that your project has a package.json or create one and reinstall husky. husky > Failed to install

husky@4.3.0 postinstall /usr/local/lib/node_modules/epage-cli/node_modules/husky opencollective-postinstall || exit 0

Thank you for using husky! If you rely on this package, please consider supporting our open collective: https://opencollective.com/husky/donate

tt-ghost commented 3 years ago

@Protagonistss 我没有复现你的问题,可以再试下 yarn global add epage-cli@latest

Protagonistss commented 3 years ago

@Protagonistss 我没有复现你的问题,可以再试下 yarn global add epage-cli@latest

epage init widgets

⠇ Downloading template...cd: no such file or directory: /Users/huangshan/Desktop/widgets The template has been downloaded!

(node:41141) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/Users/huangshan/Desktop/widgets/build/webpack.build.js'

(node:41141) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/Users/huangshan/Desktop/widgets/package.json'

问题是模版down成功了,但是没有自动创建widgets工作目录,才导致下面的错误吗?