Next.js Discord

Discord Forum

Bypass "latest canary version" check for linting?

Answered
African Slender-snouted Crocodil… posted this in #help-forum
Open in Discord
African Slender-snouted CrocodileOP
Is there any mechanism to bypass the latest canary version check when running next lint?

I'm reworking a bunch of code (in this case, unrelated to the Next.js code, rather focused on database migrations and schema updates) and want to run next lint as a convenient way to check if it seems plausible.
However, I last built this code for 15.0.4-canary.49, which was at the time the latest, but is now definitely not.

I'm a bit confused about how the (local) linter 'knows' that this is old, given the plugin is also for v15.0.4, but I tried updating to canary.52 (which I think was the last 15.0.4 version before it released) in case that helped - it did not.

I can probably run the build with linting disabled to check TypeScript etc, but the linting is normally quite useful, and it'd be nice to run it here. I could also remove the 'experimental.ppr' flag (especially because soon I'll be removing it in favour of cacheComponents), but then various other things might change/break that I'm not considering here...
Answered by African Slender-snouted Crocodile
Seems like I had an issue with installed versions vs specified versions, reinstalling the specified 15.0.4-canary.52 worked (npm i --save next@15.0.4-canary.52).
View full answer

4 Replies

African Slender-snouted CrocodileOP
Turns out you also can't build, even with --no-lint, in this case.
Orinoco Crocodile
Try disabling telemetry perhaps?
African Slender-snouted CrocodileOP
Nice idea, but didn't change the outcome. Neither did downgrading the eslint-config-next version to 15.0.3 (assuming that 15.0.4-canary.52 would be new enough to satisfy that...)
African Slender-snouted CrocodileOP
Seems like I had an issue with installed versions vs specified versions, reinstalling the specified 15.0.4-canary.52 worked (npm i --save next@15.0.4-canary.52).
Answer