Closed nataliecarey closed 1 year ago
I was about to raise the same issue - running the prototype locally is fine but when deploying to Heroku, the application crashes instantly...
2023-07-10T07:40:51.714066+00:00 app[web.1]: const { version: installedVersion } = installed ? packageJson : {} 2023-07-10T07:40:51.714066+00:00 app[web.1]: ^ 2023-07-10T07:40:51.714067+00:00 app[web.1]: 2023-07-10T07:40:51.714072+00:00 app[web.1]: TypeError: Cannot destructure property 'version' of '(intermediate value)(intermediate value)(intermediate value)' as it is undefined. 2023-07-10T07:40:51.714073+00:00 app[web.1]: at refreshPackageInfo (/app/node_modules/govuk-prototype-kit/lib/plugins/packages.js:107:20) 2023-07-10T07:40:51.714073+00:00 app[web.1]: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-07-10T07:40:51.714074+00:00 app[web.1]: at async Promise.all (index 31) 2023-07-10T07:40:51.714074+00:00 app[web.1]: at async startPackageTracker (/app/node_modules/govuk-prototype-kit/lib/plugins/packages.js:23:3) 2023-07-10T07:40:51.714074+00:00 app[web.1]:
This appears to be linked to the same issue in v13.10.0
This issue will be fixed with the following PR: Prototype will now start when a plugin is missing from node_modules
To be certain, the same test should be done when the fix above is released.
Description of the issue
When updating from
13.9.1
to13.10.0
in the browser the plugin the plugin page fails to load.The logs say "Failed to load the package cache"
Steps to reproduce the issue
npx govuk-prototype-kit create --version=13.9.1 upgrade-from-13.9.1
cd upgrade-from-13.9.1
npm run dev
Actual vs expected behaviour
Expected: The upgrade works, then the kit is fully working in the new version.
Actual: The upgrade works, but after the upgrade the kit is unable to load the
Plugins
page. I haven't tested for further impact.What's going wrong
It's logging to say
Failed to load the package cache
- failing to read a file system cache should lead to the cache either being ignored or recreated. Either option fixes this bug, recreating it would be my suggestion.