firebase / firebase-tools

The Firebase Command Line Tools
MIT License
4.01k stars 925 forks source link

firebase deploy should display more helpful error message when deployment fails due to error in user code #5300

Open EMokro opened 1 year ago

EMokro commented 1 year ago

[REQUIRED] Environment info

firebase-tools: 11.16.1

Platform: Ubuntu

[REQUIRED] Test case

package.json:

{
  "name": "functions",
  "scripts": {
    "lint": "eslint --ext .js,.ts .",
    "build": "tsc",
    "serve": "npm run build && firebase emulators:start --only functions",
    "shell": "npm run build && firebase functions:shell",
    "start": "npm run shell",
    "deploy": "firebase deploy --only functions",
    "logs": "firebase functions:log"
  },
  "engines": {
    "node": "16"
  },
  "main": "lib/index.js",
  "dependencies": {
    "braintree": "^3.12.0",
    "express": "^4.18.2",
    "firebase-admin": "^11.3.0",
    "firebase-functions": "^4.1.0"
  },
  "devDependencies": {
    "@types/braintree": "^3.3.3",
    "@types/express-serve-static-core": "^4.17.31",
    "@typescript-eslint/eslint-plugin": "^5.6.0",
    "@typescript-eslint/parser": "^5.6.0",
    "eslint": "^7.6.0",
    "eslint-config-google": "^0.14.0",
    "eslint-plugin-import": "^2.22.0",
    "firebase-functions-test": "^0.2.0",
    "typescript": "^4.8"
  },
  "private": true
}

index.ts

import * as functions from 'firebase-functions';
import * as express from 'express';
import * as cors from 'cors';
import { initializeApp } from 'firebase-admin/app';

const app = express();

app.use(cors({ origin: true }));

app.get('/', (req, res) => res.sendStatus(200));

exports.app = functions.https.onRequest(app);
initializeApp();

[REQUIRED] Steps to reproduce

This error appears since the initialization.

[REQUIRED] Expected behaviour It should run without errors

[REQUIRED] Actual behavior

The error hinders the deployment of the firebase functions

firebase-debug.log:

[debug] [2022-12-04T19:31:51.496Z] ----------------------------------------------------------------------
[debug] [2022-12-04T19:31:51.497Z] Command:       /root/.nvm/versions/node/v16.18.1/bin/node /root/freelance/projects/my-project/node_modules/.bin/firebase --debug deploy
[debug] [2022-12-04T19:31:51.497Z] CLI Version:   11.16.1
[debug] [2022-12-04T19:31:51.497Z] Platform:      linux
[debug] [2022-12-04T19:31:51.497Z] Node Version:  v16.18.1
[debug] [2022-12-04T19:31:51.498Z] Time:          Sun Dec 04 2022 20:31:51 GMT+0100 (Central European Standard Time)
[debug] [2022-12-04T19:31:51.498Z] ----------------------------------------------------------------------
[debug] 
[debug] [2022-12-04T19:31:51.540Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2022-12-04T19:31:51.541Z] > authorizing via signed-in user (mail@gmail.com)
[debug] [2022-12-04T19:31:51.541Z] [iam] checking project my-project for permissions ["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebasehosting.sites.update"]
[debug] [2022-12-04T19:31:51.542Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects/my-project:testIamPermissions [none]
[debug] [2022-12-04T19:31:51.543Z] >>> [apiv2][(partial)header] POST https://cloudresourcemanager.googleapis.com/v1/projects/my-project:testIamPermissions x-goog-quota-user=projects/my-project
[debug] [2022-12-04T19:31:51.543Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/my-project:testIamPermissions {"permissions":["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebasehosting.sites.update"]}
[debug] [2022-12-04T19:31:51.790Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects/my-project:testIamPermissions 200
[debug] [2022-12-04T19:31:51.790Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/my-project:testIamPermissions {"permissions":["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebasehosting.sites.update"]}
[debug] [2022-12-04T19:31:51.790Z] >>> [apiv2][query] POST https://iam.googleapis.com/v1/projects/my-project/serviceAccounts/my-project@appspot.gserviceaccount.com:testIamPermissions [none]
[debug] [2022-12-04T19:31:51.790Z] >>> [apiv2][body] POST https://iam.googleapis.com/v1/projects/my-project/serviceAccounts/my-project@appspot.gserviceaccount.com:testIamPermissions {"permissions":["iam.serviceAccounts.actAs"]}
[debug] [2022-12-04T19:31:52.427Z] <<< [apiv2][status] POST https://iam.googleapis.com/v1/projects/my-project/serviceAccounts/my-project@appspot.gserviceaccount.com:testIamPermissions 200
[debug] [2022-12-04T19:31:52.427Z] <<< [apiv2][body] POST https://iam.googleapis.com/v1/projects/my-project/serviceAccounts/my-project@appspot.gserviceaccount.com:testIamPermissions {"permissions":["iam.serviceAccounts.actAs"]}
[debug] [2022-12-04T19:31:52.428Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/my-project [none]
[debug] [2022-12-04T19:31:52.738Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/my-project 200
[debug] [2022-12-04T19:31:52.739Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/my-project {"projectId":"my-project","projectNumber":"699988849795","displayName":"my-project","name":"projects/my-project","resources":{"hostingSite":"my-project","realtimeDatabaseInstance":"my-project","storageBucket":"my-project.appspot.com","locationId":"us-central"},"state":"ACTIVE","etag":"1_519894af-2b25-4a61-8e82-5edb7e2a5435"}
[info] 
[info] === Deploying to 'my-project'...
[info] 
[info] i  deploying firestore, functions, hosting 
[info] ✔  functions: Finished running predeploy script. 
[info] i  firestore: reading indexes from firestore.indexes.json... 
[info] i  cloud.firestore: checking firestore.rules for compilation errors... 
[debug] [2022-12-04T19:31:52.741Z] >>> [apiv2][query] POST https://firebaserules.googleapis.com/v1/projects/my-project:test [none]
[debug] [2022-12-04T19:31:52.741Z] >>> [apiv2][body] POST https://firebaserules.googleapis.com/v1/projects/my-project:test [omitted]
[debug] [2022-12-04T19:31:53.010Z] <<< [apiv2][status] POST https://firebaserules.googleapis.com/v1/projects/my-project:test 200
[debug] [2022-12-04T19:31:53.010Z] <<< [apiv2][body] POST https://firebaserules.googleapis.com/v1/projects/my-project:test {}
[info] ✔  cloud.firestore: rules file firestore.rules compiled successfully 
[debug] [2022-12-04T19:31:53.011Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/my-project [none]
[debug] [2022-12-04T19:31:53.240Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/my-project 200
[debug] [2022-12-04T19:31:53.240Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/my-project {"projectId":"my-project","projectNumber":"699988849795","displayName":"my-project","name":"projects/my-project","resources":{"hostingSite":"my-project","realtimeDatabaseInstance":"my-project","storageBucket":"my-project.appspot.com","locationId":"us-central"},"state":"ACTIVE","etag":"1_519894af-2b25-4a61-8e82-5edb7e2a5435"}
[info] i  functions: ensuring required API cloudfunctions.googleapis.com is enabled... 
[info] i  functions: ensuring required API cloudbuild.googleapis.com is enabled... 
[info] i  artifactregistry: ensuring required API artifactregistry.googleapis.com is enabled... 
[debug] [2022-12-04T19:31:53.241Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/cloudfunctions.googleapis.com [none]
[debug] [2022-12-04T19:31:53.241Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/cloudfunctions.googleapis.com x-goog-quota-user=projects/my-project
[debug] [2022-12-04T19:31:53.242Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/runtimeconfig.googleapis.com [none]
[debug] [2022-12-04T19:31:53.242Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/runtimeconfig.googleapis.com x-goog-quota-user=projects/my-project
[debug] [2022-12-04T19:31:53.243Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/cloudbuild.googleapis.com [none]
[debug] [2022-12-04T19:31:53.243Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/cloudbuild.googleapis.com x-goog-quota-user=projects/my-project
[debug] [2022-12-04T19:31:53.243Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/artifactregistry.googleapis.com [none]
[debug] [2022-12-04T19:31:53.243Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/artifactregistry.googleapis.com x-goog-quota-user=projects/my-project
[debug] [2022-12-04T19:31:54.126Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/cloudbuild.googleapis.com 200
[debug] [2022-12-04T19:31:54.126Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/cloudbuild.googleapis.com [omitted]
[info] ✔  functions: required API cloudbuild.googleapis.com is enabled 
[debug] [2022-12-04T19:31:54.127Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/artifactregistry.googleapis.com 200
[debug] [2022-12-04T19:31:54.128Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/artifactregistry.googleapis.com [omitted]
[info] ✔  artifactregistry: required API artifactregistry.googleapis.com is enabled 
[debug] [2022-12-04T19:31:54.128Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/runtimeconfig.googleapis.com 200
[debug] [2022-12-04T19:31:54.128Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/runtimeconfig.googleapis.com [omitted]
[debug] [2022-12-04T19:31:54.129Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/cloudfunctions.googleapis.com 200
[debug] [2022-12-04T19:31:54.129Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/my-project/services/cloudfunctions.googleapis.com [omitted]
[info] ✔  functions: required API cloudfunctions.googleapis.com is enabled 
[info] i  functions: preparing codebase default for deployment 
[debug] [2022-12-04T19:31:55.280Z] Validating nodejs source
[warn] ⚠  functions: package.json indicates an outdated version of firebase-functions. Please upgrade using npm install --save firebase-functions@latest in your functions directory. 
[warn] ⚠  functions: Please note that there will be breaking changes when you upgrade. 
[debug] [2022-12-04T19:31:56.981Z] > [functions] package.json contents: {
  "name": "functions",
  "description": "Angular Universal Application",
  "main": "index.js",
  "scripts": {
    "start": "firebase functions:shell"
  },
  "engines": {
    "node": "16"
  },
  "dependencies": {
    "firebase-admin": "^9.11.1",
    "firebase-functions": "^3.6.0"
  },
  "devDependencies": {},
  "private": true
}
[debug] [2022-12-04T19:31:56.981Z] Building nodejs source
[debug] [2022-12-04T19:31:56.982Z] Could not find functions.yaml. Must use http discovery
[debug] [2022-12-04T19:31:57.068Z] Serving at port 9005

[debug] [2022-12-04T19:31:57.075Z] Got response from /__/functions.yaml Failed to generate manifest from function source: SyntaxError: Invalid left-hand side in assignment
[debug] [2022-12-04T19:31:57.078Z] Failed to parse functions.yamlincomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line at line 1, column 62:
     ... rom function source: SyntaxError: Invalid left-hand side in assi ... 
                                         ^ {"name":"YAMLException","reason":"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line","mark":{"name":null,"buffer":"Failed to generate manifest from function source: SyntaxError: Invalid left-hand side in assignment\n\u0000","position":61,"line":0,"column":61},"message":"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line at line 1, column 62:\n     ... rom function source: SyntaxError: Invalid left-hand side in assi ... \n                                         ^"}
[debug] [2022-12-04T19:31:57.081Z] shutdown requested via /__/quitquitquit

[error] 
[error] Error: Failed to load function definition from source: Failed to generate manifest from function source: SyntaxError: Invalid left-hand side in assignment

I removed parts containing sensitive data

google-oss-bot commented 1 year ago

This issue does not seem to follow the issue template. Make sure you provide all the required information.

EMokro commented 1 year ago

Gathering further information I came accross this Issue. https://github.com/firebase/firebase-tools/issues/4538

It is the same error, but I don't use the functions.config() in my project.

EMokro commented 1 year ago

@TheIronDev could you give me an update? I need to deploy the website at the beginning of next year.

TheIronDev commented 1 year ago

HI @EMokro,

I'm super sorry about the delay, this issue fell through my radar.

Is there a repo you could share where this is being reproduced? Or at the very least, do you have the output of what functions.yml is being produced?

Also, did you use webframeworks in conjunction with this project?

Thank you! Tyler

anthonykrivonos commented 1 year ago

Getting this too, how can I grab functions.yaml? @TheIronDev Seems to only be generated during runtime and I can't find it anywhere on Mac.

Here's my debug trace:

[2] [2022-12-22T00:49:33.690Z] Validating nodejs source
[2] [2022-12-22T00:49:34.803Z] > [functions] package.json contents: {
[2]   "name": "...",
[2]   "version": "1.0.0",
[2]   "description": "...!",
[2]   "main": "build/api/index.js",
[2]   "homepage": "/",
[2]   "author": "...",
[2]   "license": "MIT",
[2]   "private": false,
[2]   "scripts": {
[2]     "start": "concurrently --kill-others \"yarn build:api --watch | yarn serve\" \"yarn start:ext\" && yarn clean",
[2]     "start:api": "yarn build:api && concurrently --kill-others \"tsc -w\" \"tsc-alias -w\" \"yarn serve\" && yarn clean",
[2]     "start:ext": "yarn env ext && GENERATE_SOURCEMAP=false NODE_DEBUG=http APP=ext react-app-rewired start",
[2]     "start:web": "yarn env web && GENERATE_SOURCEMAP=false NODE_DEBUG=http APP=web react-app-rewired start",
[2]     "build": "yarn build:api && yarn build:ext && yarn build:web",
[2]     "build:api": "yarn env api && tsc && tsc-alias",
[2]     "build:ext": "yarn env ext && GENERATE_SOURCEMAP=false APP=ext INLINE_RUNTIME_CHUNK=false react-app-rewired build && ./pack_ext.sh",
[2]     ...
[2]   },
[2]   "dependencies": {
[2]     "@emotion/react": "^11.10.4",
[2]     "@google-cloud/firestore": "^5.0.2",
[2]     "@iconify/react": "^4.0.1",
[2]     "@tanstack/react-query": "^4.16.0",
[2]     "@trpc/client": "^10.0.0",
[2]     "@trpc/react-query": "^10.0.0",
[2]     "@trpc/server": "^10.0.0",
[2]     "@types/node": "18.11.17",
[2]     "@types/react": "18.0.26",
[2]     "@types/react-dom": "18.0.9",
[2]     "beautiful-react-hooks": "^3.11.2",
[2]     "classnames": "^2.3.2",
[2]     "cross-fetch": "^3.1.5",
[2]     "dotenv": "^16.0.3",
[2]     "express": "^4.17.3",
[2]     "firebase": "^9.15.0",
[2]     "firebase-admin": "^11.4.0",
[2]     "firebase-functions": "^4.1.1",
[2]     "http-errors": "^2.0.0",
[2]     "http-status-codes": "^2.2.0",
[2]     "jsonwebtoken": "^8.5.1",
[2]     "lodash": "^4.17.21",
[2]     "mixpanel": "^0.17.0",
[2]     "openai": "^3.1.0",
[2]     "polyfill-object.fromentries": "^1.0.1",
[2]     "postcss-cli": "^10.1.0",
[2]     "react": "^18.2.0",
[2]     "react-dom": "^18.2.0",
[2]     "react-hook-form": "^7.41.0",
[2]     "react-lazily": "^0.9.1",
[2]     "react-linkedin-login-oauth2": "^2.0.1",
[2]     "react-phone-input-2": "^2.15.1",
[2]     "react-router": "^6.2.2",
[2]     "react-router-dom": "^6.4.1",
[2]     "react-spinners": "^0.13.7",
[2]     "react-use": "^17.4.0",
[2]     "react-use-cookie": "^1.4.0",
[2]     "react-widgets": "^5.8.4",
[2]     "react-widgets-tailwind": "^1.1.5",
[2]     "style-loader": "^3.3.1",
[2]     "superjson": "1.9.1",
[2]     "typescript": "4.9.4",
[2]     "typewriter-effect": "^2.19.0",
[2]     "usehooks-ts": "^2.9.1",
[2]     "uuid": "^9.0.0",
[2]     "validator": "^13.7.0",
[2]     "zod": "^3.18.0"
[2]   },
[2]   "pre-commit": [
[2]     "precommit"
[2]   ],
[2]   "devDependencies": {
[2]     "@types/chrome": "^0.0.204",
[2]     "@types/classnames": "^2.3.1",
[2]     "@types/core-js": "^2.5.5",
[2]     "@types/express": "^4.17.13",
[2]     "@types/firebase": "^3.2.1",
[2]     "@types/globalthis": "^1.0.1",
[2]     "@types/http-errors": "^2.0.1",
[2]     "@types/http-status-codes": "^1.2.0",
[2]     "@types/lodash": "^4.14.191",
[2]     "@types/node": "^18.0.0",
[2]     "@types/node-cache": "^4.2.5",
[2]     "@types/passport": "^1.0.11",
[2]     "@types/passport-linkedin-oauth2": "^1.5.3",
[2]     "@types/query-string": "^6.3.0",
[2]     "@types/react": "^18.0.14",
[2]     "@types/react-dom": "^18.0.5",
[2]     "@types/uuid": "^9.0.0",
[2]     "@types/validator": "^13.7.10",
[2]     "@typescript-eslint/eslint-plugin": "^5.33.0",
[2]     "@typescript-eslint/parser": "^5.33.0",
[2]     "autoprefixer": "^10.4.13",
[2]     "concurrently": "^7.0.0",
[2]     "eslint": "^8.26.0",
[2]     "globalthis": "^1.0.3",
[2]     "kill-port": "^1.6.1",
[2]     "postcss": "^8.4.20",
[2]     "pre-commit": "^1.2.2",
[2]     "prettier": "^2.7.1",
[2]     "prettxier-plugin-tailwindcss": "^0.1.13",
[2]     "react-app-alias": "^2.2.2",
[2]     "react-app-rewire-postcss": "^3.0.2",
[2]     "react-app-rewired": "^2.2.1",
[2]     "react-dev-utils": "^12.0.1",
[2]     "react-scripts": "^5.0.1",
[2]     "tailwindcss": "^3.2.4",
[2]     "tsc-alias": "^1.8.2",
[2]     "typescript": "^4.8.3"
[2]   },
[2]   "browserslist": [
[2]     ">0.2%",
[2]     "not dead",
[2]     "not op_mini all"
[2]   ],
[2]   "engines": {
[2]     "node": "16"
[2]   }
[2] }
[2] [2022-12-22T00:49:34.803Z] Building nodejs source
[2] i  functions: Loaded environment variables from .env. 
[2] [2022-12-22T00:49:34.805Z] Could not find functions.yaml. Must use http discovery
[2] [2022-12-22T00:49:34.931Z] Serving at port 9007
[2] 
[2] [2022-12-22T00:49:35.108Z] Got response from /__/functions.yaml Failed to generate manifest from function source: SyntaxError: Unexpected token '.'
[2] [2022-12-22T00:49:35.108Z] Failed to parse functions.yamlincomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line at line 1, column 62:
[2]      ... rom function source: SyntaxError: Unexpected token '.'
[2]                                          ^ {"name":"YAMLException","reason":"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line","mark":{"name":null,"buffer":"Failed to generate manifest from function source: SyntaxError: Unexpected token '.'\n\u0000","position":61,"line":0,"column":61},"message":"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line at line 1, column 62:\n     ... rom function source: SyntaxError: Unexpected token '.'\n                                         ^"}
[2] [2022-12-22T00:49:35.114Z] shutdown requested via /__/quitquitquit
[2] 
[2] ⬢  functions: Failed to load function definition from source: FirebaseError: Failed to load function definition from source: Failed to generate manifest from function source: SyntaxError: Unexpected token '.' {"metadata":{"emulator":{"name":"functions"},"message":"Failed to load function definition from source: FirebaseError: Failed to load function definition from source: Failed to generate manifest from function source: SyntaxError: Unexpected token '.'"}}

The prefixes are due to running firebase serve with concurrently (due to a tsc + tsc-alias pairing). This worked before. Not sure what's changed but all of a sudden, I'm getting this error.

anthonykrivonos commented 1 year ago

Alright I found a niche solution for my niche problem. I was using tsc-alias to rename a @shared repo which is just a folder that had been aliased in the monorepo.

My solution was to drill down into that folder when importing classes (there must have been some circular dependency somewhere). I.e., this involved changing import { User } from '@shared' to import { User } from '@shared/models'. I know this won't be of much help for people reading this in the future, but the first place to start would be ensuring nothing funky is going on with your imports.

taeold commented 1 year ago

Usually this error message indicates that Firebase CLI couldn't require("your-function-source").

In the OP's case, the real error message is this:

[debug] [2022-12-04T19:31:57.075Z] Got response from /__/functions.yaml Failed to generate manifest from function source: SyntaxError: Invalid left-hand side in assignment

SyntaxError: Invalid left-hand side in assignment - means that there is an error in user code.

The best way to debug this issue is to try to execute your function source (e.g. node index.js).

I think Firebase CLI should be outputting more helpful error message - I'll turn this issue as a feature request for that.

svenjacobs commented 1 year ago

Hello, is there any update on this? We currently face the same problem which is firebase deploy --only functions stopped working with the error

Failed to load function definition from source: Failed to generate manifest from function source: SyntaxError: Unexpected token 'export'

We're using TypeScript but compiling with tsc does work as before. Also node lib/index.js doesn't show any error. We're currently struggling to find which change actually broke deployment and which export it doesn't like because we've been using export all over the project before 🤷🏼‍♂️

yatkolenko commented 11 months ago

Any updates? I have the same issue Node 18