openstax / staxly

:robot: beep boop
http://openstax.github.io/staxly
ISC License
8 stars 3 forks source link

update node version to v20 #114

Closed philschatz closed 4 months ago

philschatz commented 4 months ago

It's been a while since we upgraded node and the production version of staxly keeps crashing though the dev version seems to be up and running. This is part of a test to get staxly running again.

Logs:

2024-06-13T16:27:15.492599+00:00 heroku[web.1]: State changed from starting to crashed
2024-06-13T16:27:33.670433+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=staxly-pipel-update-nod-svuawo.herokuapp.com request_id=8e908c0e-c08c-4c18-b4dc-15964f2ada86 fwd="97.115.238.0" dyno= connect= service= status=503 bytes= protocol=https
2024-06-13T16:27:34.159700+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=staxly-pipel-update-nod-svuawo.herokuapp.com request_id=72da1c71-8c59-46ce-a009-cbc73da2f903 fwd="97.115.238.0" dyno= connect= service= status=503 bytes= protocol=https
2024-06-13T16:28:13.524958+00:00 heroku[web.1]: State changed from crashed to starting
2024-06-13T16:28:17.957572+00:00 heroku[web.1]: Starting process with command `npm start`
2024-06-13T16:28:19.105879+00:00 app[web.1]: 
2024-06-13T16:28:19.105955+00:00 app[web.1]: > staxly@1.0.0 start
2024-06-13T16:28:19.105955+00:00 app[web.1]: > probot run ./index.cjs
2024-06-13T16:28:19.105956+00:00 app[web.1]: 
2024-06-13T16:28:19.489497+00:00 app[web.1]: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/app/src/utils/configBlock' imported from /app/src/utils/versionsBlock.js
2024-06-13T16:28:19.489529+00:00 app[web.1]:     at finalizeResolution (node:internal/modules/esm/resolve:265:11)
2024-06-13T16:28:19.489531+00:00 app[web.1]:     at moduleResolve (node:internal/modules/esm/resolve:933:10)
2024-06-13T16:28:19.489531+00:00 app[web.1]:     at defaultResolve (node:internal/modules/esm/resolve:1157:11)
2024-06-13T16:28:19.489531+00:00 app[web.1]:     at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
2024-06-13T16:28:19.489531+00:00 app[web.1]:     at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
2024-06-13T16:28:19.489532+00:00 app[web.1]:     at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38)
2024-06-13T16:28:19.489532+00:00 app[web.1]:     at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
2024-06-13T16:28:19.489532+00:00 app[web.1]:     at link (node:internal/modules/esm/module_job:86:36) {
2024-06-13T16:28:19.489536+00:00 app[web.1]:   code: 'ERR_MODULE_NOT_FOUND',
2024-06-13T16:28:19.489536+00:00 app[web.1]:   url: 'file:///app/src/utils/configBlock'
2024-06-13T16:28:19.489538+00:00 app[web.1]: }
2024-06-13T16:28:19.503661+00:00 app[web.1]: npm notice
2024-06-13T16:28:19.503663+00:00 app[web.1]: npm notice New minor version of npm available! 10.7.0 -> 10.8.1
2024-06-13T16:28:19.503663+00:00 app[web.1]: npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
2024-06-13T16:28:19.503664+00:00 app[web.1]: npm notice To update run: npm install -g npm@10.8.1
2024-06-13T16:28:19.503664+00:00 app[web.1]: npm notice
2024-06-13T16:28:19.568279+00:00 heroku[web.1]: Process exited with status 1
2024-06-13T16:28:19.588705+00:00 heroku[web.1]: State changed from starting to crashed
philschatz commented 4 months ago

Slack's API does not work with newer node:

2024-06-13T16:55:52.522015+00:00 heroku[web.1]: State changed from starting to up
2024-06-13T16:55:52.266913+00:00 app[web.1]: {"level":10,"time":1718297752266,"pid":28,"hostname":"ed3b34ed-25be-4531-bab1-ddd3cf54eaff","name":"probot","name":"probot","name":"slack","msg":"Slack connecting..."}
2024-06-13T16:55:52.315595+00:00 app[web.1]: {"level":30,"time":1718297752315,"pid":28,"hostname":"ed3b34ed-25be-4531-bab1-ddd3cf54eaff","name":"probot","name":"server","msg":"Running Probot v12.4.0 (Node.js: v20.14.0)"}
2024-06-13T16:55:52.391512+00:00 app[web.1]: {"level":30,"time":1718297752391,"pid":28,"hostname":"ed3b34ed-25be-4531-bab1-ddd3cf54eaff","name":"probot","name":"server","msg":"Forwarding https://smee.io/vWPCFjV1F0rIVieR to http://localhost:34899/"}
2024-06-13T16:55:52.391562+00:00 app[web.1]: {"level":30,"time":1718297752391,"pid":28,"hostname":"ed3b34ed-25be-4531-bab1-ddd3cf54eaff","name":"probot","name":"server","msg":"Listening on http://localhost:34899"}
2024-06-13T16:55:52.446993+00:00 app[web.1]: {"level":30,"time":1718297752446,"pid":28,"hostname":"ed3b34ed-25be-4531-bab1-ddd3cf54eaff","name":"probot","name":"probot","name":"slack","msg":"Authenticated"}
2024-06-13T16:55:52.447177+00:00 app[web.1]: {"level":20,"time":1718297752446,"pid":28,"hostname":"ed3b34ed-25be-4531-bab1-ddd3cf54eaff","name":"probot","name":"probot","name":"slack","ok":true,"url":"wss://wss-primary.slack.com/websocket/LEGACY_BOT:82acce7220aa1362178cb3cde7bc1ed7","team":{"id":"T0F5B5PGQ","name":"openstax","domain":"openstax"},"self":{"id":"U9PDVBLKE","name":"staxly-dev"},"response_metadata":{"scopes":["identify","read","post","client","apps"],"acceptedScopes":["rtm:stream","client"]}}
2024-06-13T16:55:52.481427+00:00 app[web.1]: {"level":10,"time":1718297752481,"pid":28,"hostname":"ed3b34ed-25be-4531-bab1-ddd3cf54eaff","name":"probot","name":"probot","name":"slack","msg":"Slack connected"}
2024-06-13T16:55:52.525560+00:00 app[web.1]: {"level":30,"time":1718297752525,"pid":28,"hostname":"ed3b34ed-25be-4531-bab1-ddd3cf54eaff","name":"probot","name":"server","msg":"Connected"}
2024-06-13T16:55:58.492705+00:00 app[web.1]: TypeError: Cannot read properties of null (reading 'message')
2024-06-13T16:55:58.492788+00:00 app[web.1]:     at /app/node_modules/@slack/rtm-api/dist/RTMClient.js:377:89
2024-06-13T16:55:58.492789+00:00 app[web.1]:     at afterWrite (node:internal/streams/writable:701:5)
2024-06-13T16:55:58.492789+00:00 app[web.1]:     at onwrite (node:internal/streams/writable:679:7)
2024-06-13T16:55:58.492790+00:00 app[web.1]:     at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:107:10)
2024-06-13T16:56:00.515550+00:00 app[web.1]: npm notice
2024-06-13T16:56:00.515627+00:00 app[web.1]: npm notice New minor version of npm available! 10.7.0 -> 10.8.1
2024-06-13T16:56:00.515628+00:00 app[web.1]: npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
2024-06-13T16:56:00.515629+00:00 app[web.1]: npm notice To update run: npm install -g npm@10.8.1
2024-06-13T16:56:00.515629+00:00 app[web.1]: npm notice
2024-06-13T16:56:00.569336+00:00 heroku[web.1]: Process exited with status 1
2024-06-13T16:56:00.597376+00:00 heroku[web.1]: State changed from up to crashed