You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I am trying to deploy my app using rc-apps deploy , I get the following error:
> node_modules/fetch-blob/from.js:83:2: error: Transforming async generator functions to the configured target environment ("node10") is not supported yet
83 │ async * stream () {
╵ ~~~~~
> node_modules/node-fetch/src/body.js:223:6: error: Transforming for-await loops to the configured target environment ("node10") is not supported yet
223 │ for await (const chunk of body) {
╵ ~~~~~
> node_modules/fetch-blob/index.js:12:0: error: Transforming async generator functions to the configured target environment ("node10") is not supported yet
12 │ async function * toIterator (parts, clone = true) {
╵ ~~~~~
> node_modules/fetch-blob/index.js:122:8: error: Transforming for-await loops to the configured target environment ("node10") is not supported yet
122 │ for await (const part of toIterator(this.#parts, false)) {
╵ ~~~~~
> node_modules/fetch-blob/index.js:145:8: error: Transforming for-await loops to the configured target environment ("node10") is not supported yet
145 │ for await (const chunk of toIterator(this.#parts, false)) {
╵ ~~~~~
> node_modules/web-streams-polyfill/dist/ponyfill.es2018.js:519:79: error: Transforming async generator functions to the configured target environment ("node10") is not supported yet
519 │ const AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () { }).prototype);
╵ ~~~~~
> node_modules/node-fetch/src/utils/multipart-parser.js:425:5: error: Transforming for-await loops to the configured target environment ("node10") is not supported yet
425 │ for await (const chunk of Body) {
╵ ~~~~~
Packaging the app... ✖
› Error: ⟿ Build failed with 7 errors:
› node_modules/fetch-blob/from.js:83:2: error: Transforming async generator functions to the configured target environment ("node10") is not supported yet
› node_modules/fetch-blob/index.js:12:0: error: Transforming async generator functions to the configured target environment ("node10") is not supported yet
› node_modules/fetch-blob/index.js:122:8: error: Transforming for-await loops to the configured target environment ("node10") is not supported yet
› node_modules/fetch-blob/index.js:145:8: error: Transforming for-await loops to the configured target environment ("node10") is not supported yet
› node_modules/node-fetch/src/body.js:223:6: error: Transforming for-await loops to the configured target environment ("node10") is not supported yet
Is this error occuring due to a bug within RC or the library node-fetch ?My current code is:
import {
IHttp,
IModify,
IRead,
} from '@rocket.chat/apps-engine/definition/accessors';
import fetch from 'node-fetch';
import {
ISlashCommand,
SlashCommandContext,
} from '@rocket.chat/apps-engine/definition/slashcommands';
export class n implements ISlashCommand {
public command = 'n';
public i18nParamsExample = '';
public i18nDescription = '';
public providesPreview = false;
public async executor(context: SlashCommandContext, read: IRead, modify: IModify, http: IHttp): Promise<void> {
const supply = '{"fields": {"project": {"key": "TEST"},"summary": "TEST the API","description": "testing API","issuetype": {"name": "Bug"},"customfield_11050": "idk."}}'
const response = await fetch('http://localhost:3000/', {
method: 'post',
body: JSON.stringify(supply),
headers: {'Content-Type': 'application/json'}
});
const data = await response.json();
console.log(data);
};
};
When I am trying to deploy my app using
rc-apps deploy
, I get the following error:Is this error occuring due to a bug within RC or the library
node-fetch
?My current code is:My tsconfig.json file looks like this:
Your Environment
The text was updated successfully, but these errors were encountered: