Rocket.Chat's Community Open Call 🎤 Dec 15, 2021 Join us!

Rc-apps package don't accept my imports

Hi,

I get this error Error: Cannot find module ‘./commands/Ticket’

The tree is :
app/App.ts
app/commands/Ticket.ts

In App.ts :

import {
    IAppAccessors,
    ILogger,
    IConfigurationExtend,
    IRead,
    IHttp,
    IPersistence,
    IMessageExtender,
    IMessageBuilder,
} from '@rocket.chat/apps-engine/definition/accessors';
import { ApiSecurity, ApiVisibility } from '@rocket.chat/apps-engine/definition/api';
import { App } from '@rocket.chat/apps-engine/definition/App';
import { IMessage, IPreMessageSentModify } from '@rocket.chat/apps-engine/definition/messages';
import { IAppInfo } from '@rocket.chat/apps-engine/definition/metadata';
import { SettingType } from '@rocket.chat/apps-engine/definition/settings';
import { TicketCommand } from './commands/Ticket';

Thanks

Hi @agenet!

I personally really can’t help you on that, as I have almost no experience in developing Rocket.Chat Apps so far :frowning:

However… I posted this thread on our #rocketchat-apps in the open:

Could you check there? That’s probably a better place to get help on that.

Thanks!

Where do you get this issue at? The CLI or your editor or where? Can you show screenshots and provide more detail. Thank you.

Hi,

Sorry for the delay, the issue come from my Windows build environnement . No problem with a docker one.

Hi could you please explain when you’re seeing the error? When trying to deploy it? Or in rc logs upon attempting to use the app?

Seems you’re using the wrong Rocket.Chat Apps CLI version.
With Rocket.Chat v3, you could use Apps CLI version 1.8.1
With Rocket.Chat v4, use the lastest version

The error came when i run rc-apps package with the last version.