Rocket.Chat.Apps-cli
Rocket.Chat.Apps-cli copied to clipboard
Error when scaffolding new app - Cannot find name 'Buffer'
Description
I just wanted to setup a new blank app using rc-apps create
and received the following error after filling out the prompts:
❯ 216_rocketchat-app-otrs rc-apps create
Let's get started creating your app.
We need some information first:
App Name: OTRS Integration
App Description: Automatically transforms OTRS ticket IDs into clickable URLs
Author's Name: Jonas Friedmann
Author's Home Page: https://frd.mn
Author's Support Page: https://github.com/frdmn/rocketchat-app-otrs
› Error: /Users/jonas/Development/216_rocketchat-app-otrs/otrs-integration/node_modules/@rocket.chat/apps-engine/definition/accessors/IUploadRead.d.ts (4,40):
› Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i @types/node`.
› Error: /Users/jonas/Development/216_rocketchat-app-otrs/otrs-integration/node_modules/@rocket.chat/apps-engine/definition/accessors/IUploadRead.d.ts (5,41):
› Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i @types/node`.
Creating a Rocket.Chat App in /Users/jonas/Development/216_rocketchat-app-otrs/otrs-integration... !
Error: invalid.
at Create.run (/usr/local/lib/node_modules/@rocket.chat/apps-cli/lib/commands/create.js:52:19)
at async Create._run (/usr/local/lib/node_modules/@rocket.chat/apps-cli/node_modules/@oclif/command/lib/command.js:44:20)
at async Config.runCommand (/usr/local/lib/node_modules/@rocket.chat/apps-cli/node_modules/@oclif/config/lib/config.js:160:9)
at async Main.run (/usr/local/lib/node_modules/@rocket.chat/apps-cli/node_modules/@oclif/command/lib/main.js:21:9)
at async Main._run (/usr/local/lib/node_modules/@rocket.chat/apps-cli/node_modules/@oclif/command/lib/command.js:44:20)
Workaround
Running npm install @types/node
within the current working directoy where the command (rc-apps create
) was issues, fixes the problem.
Environment
- OS: macOS 10.15.3
- Node: v13.8.0
- NPM: 6.13.7
-
@rocket.chat/apps-cli
: latest/1.6.0