lichess-org/chessground

Error `Could not resolve "./package.json"` on v9.0.1

printfn opened this issue · 1 comments

Hi, when I tried updating Chessground from v8.4.0 to v9.0.1, I got this error in my SvelteKit-based app:

✘ [ERROR] Could not resolve "./package.json"

    node_modules/chessground/dist/chessground.js:10:24:
      10 │ import { version } from './package.json';
         ╵                         ~~~~~~~~~~~~~~~~

3:10:03 PM [vite] error while updating dependencies:
Error: Build failed with 1 error:
node_modules/chessground/dist/chessground.js:10:24: ERROR: Could not resolve "./package.json"
    at failureErrorWithLog (/home/user/chess/web/node_modules/esbuild/lib/main.js:1649:15)
    at /home/user/chess/web/node_modules/esbuild/lib/main.js:1058:25
    at /home/user/chess/web/node_modules/esbuild/lib/main.js:1525:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Look like that trick with the symlink was not portable. #285 will have fixed it.