I’ve been looking at updating Atlassian Connect Express (ACE) to the very latest version.
My app uses ACE with postgres (in dev, …, and production).
Using ACE v8.0.2 it works
Using ACE v8.1.0 it does not work
Using ACE v8.2.0 it does not work
It does not start. Here’s the console messages (which are the same for both v8.1.0 & v8.2.0):
npm run watch-server
> my-app@1.0.0-AC watch-server
> NODE_ENV=development nodemon -r dotenv/config -r esm app.js
[nodemon] 2.0.20
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node -r dotenv/config -r esm app.js`
...
/path/to/my-app/node_modules/mongodb/lib/collection.js:74
pkFactory: db.options?.pkFactory ?? utils_1.DEFAULT_PK_FACTORY,
^
SyntaxError: Invalid or unexpected token
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
Node.js v18.12.1
[nodemon] app crashed - waiting for file changes before starting...
Whats the difference?
From the release notes:
8.2.0
- Added support for FedRAMP sandbox tenants for OAuth2 and installation callbacks
8.1.1
- Update dependency sqlite3 to v5.1.6
- Update dependency @aws-sdk/client-dynamodb to v3.398.0
8.1.0
- Update dependency mongodb to v5. Note: only the Node.js driver was updated and the new version is still compatible with MongoDB 3.6 and later.
- …
It looks like the update to mongodb v5 in ACE 8.1.0 broke things.
I’m not even using anything to do with mongodb, so why is my app now broken with ACE v8.2.0?
Note: I’m running the app using esm using the following watch-server
in package.json
:
"watch-server": "NODE_ENV=development nodemon -r dotenv/config -r esm app.js",
Aside, here’s my abridged config.json
:
{
development: {
...
"store": {
"adapter": "sequelize",
"type": "postgres",
"url": "postgres://username:@localhost:5432/gaij"
// assumed that your development machine user is `username` and you're running Postgres w/o a password
},
},
...
}