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

Ouverte
#61 1 commentaire 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
38/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
node.js, typescript

Piste de recherche

Reproduce rc-apps create with the reported Node, npm, and @rocket.chat/apps-cli versions. Start with the generated app's dependency and type setup, then inspect the IUploadRead.d.ts errors and the create.js command path mentioned in the trace. Done means a fresh scaffold completes without manually installing @types/node.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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
Langage dominant
TypeScript
Étoiles
49
Forks
40
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de RocketChat/Rocket.Chat.Apps-cli

Toutes les issues de RocketChat/Rocket.Chat.Apps-cli

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.