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

Đang mở
#61 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
node.js, typescript
Lĩnh vực
cli, developer-experience

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
TypeScript
Star
49
Fork
40
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của RocketChat/Rocket.Chat.Apps-cli

Tất cả issue của RocketChat/Rocket.Chat.Apps-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.