RocketChat / Rocket.Chat.Apps-cli

The CLI for interacting with Rocket.Chat Apps
MIT License
47 stars 27 forks source link

Deployment error: Debug Failure. When trying to use npm modules #70

Closed EnNico closed 4 years ago

EnNico commented 4 years ago

I cannot use certain libraries, like fs or form-data.

import FormData = require('form-data');
import { createReadStream } from "fs";

When i import them, and attempt to deploy the app i get the following error:

packaging your app... packaged!
deploying your app... !
Error: Deployment error: Debug Failure. False expression.
    at Deploy.asyncSubmitData (C:/Users/NEngetsberger/AppData/Roaming/npm/node_modules/@rocket.chat/apps-cli/lib/commands/deploy.js:100:19)
    at async Deploy.run (C:/Users/NEngetsberger/AppData/Roaming/npm/node_modules/@rocket.chat/apps-cli/lib/commands/deploy.js:47:9)
    at async Deploy._run (C:/Users/NEngetsberger/AppData/Roaming/npm/node_modules/@rocket.chat/apps-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async Config.runCommand (C:/Users/NEngetsberger/AppData/Roaming/npm/node_modules/@rocket.chat/apps-cli/node_modules/@oclif/config/lib/config.js:172:9)
    at async Main.run (C:/Users/NEngetsberger/AppData/Roaming/npm/node_modules/@rocket.chat/apps-cli/node_modules/@oclif/command/lib/main.js:22:9)
    at async Main._run (C:/Users/NEngetsberger/AppData/Roaming/npm/node_modules/@rocket.chat/apps-cli/node_modules/@oclif/command/lib/command.js:43:20)

What I want to do is to develop a slashcommand which readd the chat of a room and provides the conversation as a pdf "uploaded" into the room. I couldnt find any examples using the rocket.chat/apps-engine/definition types like IRoom etc. so I tried to create a file in the command's executor method and upload it via the Rocket.Chat REST API. Is There also any kind of log, i have got this error multiple times and can't really tell whats the specific problem.

Here is my package.json:

{
    "devDependencies": {
        "@rocket.chat/apps-engine": "^1.14.0",
        "tslint": "^5.10.0",
        "typescript": "^2.9.1"
    },
    "dependencies": {
        "@types/form-data": "^2.5.0",
        "@types/jspdf": "^1.3.3",
        "@types/node": "^14.0.5",
        "form-data": "^3.0.0",
        "jspdf": "^1.5.3"
    }
}

I do not know if what I am doing is straight off not possible, but i could not find any documentation to it.

graywolf336 commented 4 years ago

It is not currently possible. Please see this issue: https://github.com/RocketChat/Rocket.Chat.Apps-engine/issues/56