Closed takuan-osho closed 3 years ago
Thanks for the report, @takuan-osho.
I believe there is a bug within the create-bottender-app flow, you should at least select one of the platform for generating the initial code for you.
If you select none and click enter, the flow still carry on, and cause the error. The state like this cause the error:
This is the okay flow:
We will try to fix this issue, and maybe you can keep trying what you were trying with at least one platform selected?
Or if you have any further feedback or suggestions, please let us know!
@wtflink Thank you for your quick reply!
maybe you can keep trying what you were trying with at least one platform selected?
I followed your advice and confirmed that no errors occurred when I selected one of the platforms like this. Thanks!
$ npx create-bottender-app my-app --typescript
npx: 62個のパッケージを4.611秒でインストールしました。
? What platform of bot do you want to create? line
? Where do you want to store session? memory
❯
❯ Creating a new Bottender bot at /Users/taku/dev/src/github.com/takuan-osho-sandbox/my-app.
❯
❯ Installing packages... This might take a couple of minutes.
❯
warning bottender > @hapi/joi@15.1.1: Switch to 'npm install joi'
warning bottender > axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
warning bottender > messaging-api-common > axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
warning bottender > messaging-api-line > axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
warning bottender > messaging-api-telegram > axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
warning bottender > @hapi/joi > @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
warning bottender > @hapi/joi > @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
warning bottender > @hapi/joi > @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
warning bottender > @hapi/joi > @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
warning bottender > @hapi/joi > @hapi/topo > @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
warning bottender > messaging-api-slack > axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
warning bottender > messaging-api-messenger > axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
warning bottender > messaging-api-viber > axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
warning bottender > ngrok > request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
warning bottender > ngrok > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning jest > @jest/core > jest-config > jest-environment-jsdom > jsdom > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning jest > @jest/core > jest-config > jest-environment-jsdom > jsdom > request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
warning jest > @jest/core > jest-haste-map > sane > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning jest > @jest/core > jest-haste-map > sane > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
[###############################################################################################################################################################################################] 1934/1934
❯ Success!
❯ Created my-app at /Users/taku/dev/src/github.com/takuan-osho-sandbox/my-app
❯ Please make sure you have edited .env or bottender.config.js before running the bot.
❯
❯ Inside that directory, you can run several commands:
❯
❯ yarn start
❯ Starts the production server.
❯
❯ yarn dev
❯ Starts the development server.
❯
❯ yarn lint
❯ Checks the code with the linter.
❯
❯ We suggest that you begin by typing:
❯
❯ cd my-app
❯ yarn dev
❯
❯ Happy hacking!
FYI: when I created this issue, I missed the below sentence generated by create-bottender-app command.
? What platform of bot do you want to create? (Press <space> to select, <a> to toggle all, <i> to invert selection)
I forgot to press space to select. I pressed return button.
Describe the bug I read this blog article of bottender and tried to start the section of Getting Started with
--typescript
option.However,
npx create-bottender-app my-app --typescript
failed and I could not start it.Here are the full logs when
npx create-bottender-app my-app --typescript
fails.To Reproduce Steps to reproduce the behavior:
npx create-bottender-app my-app --tyescript
Then you would see the error logs like the logs I wrote in
Describe the bug
section.FYI: Here is my software versions I used
Expected behavior
We can do
npx create-bottender-app my-app --typescript
with no errors.Screenshots
There is no screenshot.
Additional context
I think below is the part of the cause of this issue though I'm not familiar with JavaScript/TypeScript and their ecosystems. https://github.com/Yoctol/bottender/blob/v1.5.1-alpha.8/packages/create-bottender-app/src/utils/generateAppEntry.ts#L33-L45