Why Does the Error "Command failed: pnpm install –prefer-offline –ignore-scripts -P" Appear in New Action Even With Simple Code?

This topic was automatically generated from Slack. You can find the original thread here.

Hi. please help to understand why does this error appears in new Action:
"Command failed: pnpm install –prefer-offline –ignore-scripts -P"

It appears in any code. Even simplest:

import {TELEGRAM_BOT_API_UI_MEDIA_AUDIO} from "@pipedream/components/telegram_bot_api/common/constants.mjs";
export default defineComponent({
  async run({ steps, $ }) {
    console.log("Hello, World!")
  },
})

What’s wrong with “import” line, Idk

we don’t expose the constants module or the TELEGRAM_BOT_API_UI_MEDIA_AUDIO var directly. But we do expose all auth, prop definitions, and methods from the app’s app file.

To see what you have access to, run:

import telegram from "@pipedream/telegram_bot_api"

export default defineComponent({
  async run({ steps, $ }) {
    return telegram
  },
})

And you’ll see the full module object available for inspection.

Would that help in this case?

If you need access toTELEGRAM_BOT_API_UI_MEDIA_AUDIO directly, we can move it to the app file and make it available for you (or I can show you how to do that yourself).

I was trying to modify pipedream’s action Telegram->“send-text-message-or-reply.mjs”.
Just took that code and added string to work with Topics, to send message in needed Topic, with additional optional parametr “message_thread_id - Integer” in sendMessage method**.**
i will try

for fast coding, i just took another way, just make another type of action, non js, “HTTP Request Configuration” with type POST and Params works now.
Thanks for help anyway