lichess-org / chessground

Mobile/Web chess UI for lichess.org
https://lichess.org
GNU General Public License v3.0
1.01k stars 260 forks source link

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

Closed printfn closed 11 months ago

printfn commented 11 months ago

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)
niklasf commented 11 months ago

Look like that trick with the symlink was not portable. https://github.com/lichess-org/chessground/pull/285 will have fixed it.