Subject of the issue
The package-lock.json has several dependencies pinned to older patch versions that contain known bugs. For example, adapt-authoring-authored is locked to 1.3.6 despite package.json specifying ^1.1.0 - meaning 1.4.0 (the latest) should resolve, but doesn't because of the lockfile.
adapt-authoring-authored@1.3.6 has a bug where updateAuthor loses its this binding when tapped onto the request hook, causing a TypeError: Cannot read properties of undefined (reading 'app') on every content query. This was fixed in v1.3.7 and further improved in v1.3.9.
Additionally, @adapt-security/at-utils is locked to 0.19.2 while the latest is 0.21.1. This was the source of a separate issue encountered the same day.
These were two of at least two issues encountered in one session caused by stale locked versions, so a broader npm update across all dependencies would be worthwhile.
Steps to reproduce
- Fresh install with current
package-lock.json
- Create a course
- Navigate to the dashboard
- Courses are not displayed - server logs show
error.undefined with a TypeError stack trace originating from AuthoredModule.updateAuthor
Expected behaviour
Dashboard displays created courses.
Actual behaviour
Dashboard is empty. Server logs:
warn lang missing key 'en.error.undefined'
error server error.undefined TypeError: Cannot read properties of undefined (reading 'app')
at updateAuthor (adapt-authoring-authored/lib/AuthoredModule.js:77:30)
at Hook.invoke (adapt-authoring-core/lib/Hook.js:81:59)
at ContentModule.queryHandler (adapt-authoring-api/lib/AbstractApiModule.js:476:30)
Suggested Fix
Run npm update to refresh the lockfile, pulling in the latest compatible versions of all dependencies. At minimum:
adapt-authoring-authored needs >=1.3.7
@adapt-security/at-utils needs >=0.20.0 (currently 0.19.2, latest 0.21.1)
Posted via collaboration with Claude Code
Subject of the issue
The
package-lock.jsonhas several dependencies pinned to older patch versions that contain known bugs. For example,adapt-authoring-authoredis locked to1.3.6despitepackage.jsonspecifying^1.1.0- meaning1.4.0(the latest) should resolve, but doesn't because of the lockfile.adapt-authoring-authored@1.3.6has a bug whereupdateAuthorloses itsthisbinding when tapped onto the request hook, causing aTypeError: Cannot read properties of undefined (reading 'app')on every content query. This was fixed inv1.3.7and further improved inv1.3.9.Additionally,
@adapt-security/at-utilsis locked to0.19.2while the latest is0.21.1. This was the source of a separate issue encountered the same day.These were two of at least two issues encountered in one session caused by stale locked versions, so a broader
npm updateacross all dependencies would be worthwhile.Steps to reproduce
package-lock.jsonerror.undefinedwith aTypeErrorstack trace originating fromAuthoredModule.updateAuthorExpected behaviour
Dashboard displays created courses.
Actual behaviour
Dashboard is empty. Server logs:
Suggested Fix
Run
npm updateto refresh the lockfile, pulling in the latest compatible versions of all dependencies. At minimum:adapt-authoring-authoredneeds>=1.3.7@adapt-security/at-utilsneeds>=0.20.0(currently0.19.2, latest0.21.1)Posted via collaboration with Claude Code