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

Error when scaffolding new app - Cannot find name 'Buffer' #61

Open
frdmn opened this issue Mar 4, 2020 · 1 comment
Open

Error when scaffolding new app - Cannot find name 'Buffer' #61

frdmn opened this issue Mar 4, 2020 · 1 comment

Comments

@frdmn
Copy link

frdmn commented Mar 4, 2020

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
@zjadir
Copy link

zjadir commented Apr 9, 2020

I don't remember where I found the solution, but for me, I had to run the following command before creating a new app. It installs the needed package.

npm install --save-dev @types/node

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