Closed lfdebrux closed 2 years ago
One workaround is to delete the package.json
file before running the command, we could tell users to do this in our online instructions. Another alternative is to tell them to install the package globally first. Both of these feel a little icky though :(
Another possibility is adding a path option to the migrate script, so instead of telling them to change directory, we tell them to run the script in the containing folder. This might be hard to explain though, and could cause confusion...
Found another potential workaround: running npx govuk-prototype-kit@latest version
results in npx looking for the package online (tested with npm 8.19.2).
Going to have a chat with @joelanman and @BenSurgisonGDS to check that we're happy to tell users to use the npx
workaround, or another of the other workarounds, or to look for another solution.
We've agree to tell users to npx govuk-prototype-kit@latest migrate
. So we'll fix this issue in documentation.
We could also try npx govuk-prototype-kit@13 migrate
, although currently we can't test this.
I've updated the draft content in https://github.com/alphagov/govuk-prototype-kit/issues/1672, calling this ticket done.
Description of the issue
When running
npx govuk-prototype-kit migrate
in a prototype from v12 or older, users will likely get the following error:Steps to reproduce the issue
npx govuk-prototype-kit migrate
Actual vs expected behaviour
Environment (where applicable)