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

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

Open
Protagonistss opened this issue Oct 30, 2020 · 4 comments
Open

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

Protagonistss opened this issue Oct 30, 2020 · 4 comments

Comments

@Protagonistss
Copy link

Protagonistss commented Oct 30, 2020

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):

  • OS: Mac OS
  • npm: 6.12
  • node: v10.15.13
@tt-ghost
Copy link
Collaborator

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

然后 epage init explore-widgets

@Protagonistss
Copy link
Author

Protagonistss commented Oct 30, 2020

@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 安装出现了一下问题,不知是否有影响

[email protected] 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

[email protected] 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
Copy link
Collaborator

tt-ghost commented Nov 4, 2020

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

@Protagonistss
Copy link
Author

@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工作目录,才导致下面的错误吗?

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

No branches or pull requests

2 participants