admin管理员组

文章数量:1122832

VERSIONS

Next.JS: 14.2.3\
React: ^18
NodeJS: 23.3.0/win11/arm64

DESCRIPTION

Recently I saw a linter which helps you optimize your react code and decided to connect it to my Next.JS project. According to official Get Started section I wrote\

npx million@latest

and it ran installation. After installation completed, it changed next.config.mjs

Then when I'm starting localhost in dev mode it shows me error:

⚠ Internal Error: Your build cache files are corrupted and has been reset. Please restart your dev server.

And here is full console logs:

vladi@vlud CLANGARM64 ~/Documents/code/rest/million/reproducible_example (master)
$ npm run dev

> [email protected] dev
> next dev

(node:7096) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
  ▲ Next.js 14.2.3
  - Local:        http://localhost:3000

 ✓ Starting...
(node:10536) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

 ⚡ Million Lint v1.0.12
 ✓ Ready in 0.29ms

 ✓ Ready in 2.6s
 ○ Compiling / ...

warn - The `content` option in your Tailwind CSS configuration is missing or empty.
warn - Configure your content sources or your generated CSS will be missing styles.
warn - 
 ✓ Compiled / in 2.2s (504 modules)
 GET / 200 in 2291ms
 ⚠ Internal Error: Your build cache files are corrupted and has been reset. Please restart your dev server.


vladi@vlud CLANGARM64 ~/Documents/code/rest/million/reproducible_example (master)

Example was ran in a clean next.js#14.2.3 project

page.tsx:

"use client";

import { useState } from "react";

export default function Home() {
   const [count, setCount] = useState<number>(0);

   const increase = () => {
      setCount(count + 1);
   };

   const decrease = () => {
      setCount(count - 1);
   };

   return (
      <main>
         <button onClick={increase}>+</button>
         <p>{count}</p>
         <button onClick={decrease}>-</button>
      </main>
   );
}

next.config.mjs:

import MillionLint from "@million/lint";
/** @type {import('next').NextConfig} */
const nextConfig = {};

export default MillionLint.next({
   enabled: true,
   rsc: true,
})(nextConfig);

本文标签: javascriptBuild cache files are corrupted while trying to run million lint with nextStack Overflow