JLyne / LiveAtlas

A Dynmap, Squaremap, Pl3xmap and Overviewer frontend for the modern web
Apache License 2.0
336 stars 37 forks source link

Error correction #633

Closed jadnast closed 4 months ago

jadnast commented 1 year ago

First issue

D:\Windows11\destkop\LiveAtlas-master\.pnp.cjs:15329
  return Object.defineProperties(new Error(message), {
                                 ^

Error: Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).

Missing package: esbuild@npm:0.18.11
Expected package location: D:\Windows11\destkop\LiveAtlas-master\.yarn\unplugged\esbuild-npm-0.18.11-7ebdd30a31\node_modules\esbuild\

    at makeError (D:\Windows11\destkop\LiveAtlas-master\.pnp.cjs:15329:34)
    at resolveUnqualified (D:\Windows11\destkop\LiveAtlas-master\.pnp.cjs:17090:17)
    at resolveRequest (D:\Windows11\destkop\LiveAtlas-master\.pnp.cjs:17142:14)
    at Object.resolveRequest (D:\Windows11\destkop\LiveAtlas-master\.pnp.cjs:17198:26)
    at resolve$1 (file:///D:/Windows11/destkop/LiveAtlas-master/.pnp.loader.mjs:1989:21)
    at async nextResolve (node:internal/modules/esm/loader:163:22)
    at async ESMLoader.resolve (node:internal/modules/esm/loader:835:24)
    at async ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:7)
    at async ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:21)

Node.js v18.17.0

For resolve this issue:

  1. We clean cache:
    yarn cache clean
  2. We install dependencies:
    yarn install

If issue not corrected, just check PnP settings .pnp.cjs

Second issue

[vite]: Rollup failed to resolve import "leaflet/dist/leaflet.css" from "D:/Windows11/destkop/LiveAtlas-master/src/main.ts". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to `build.rollupOptions.external`

For resolve this issue:

  1. We add build.rollupOptions.external: In vite.config.ts in build we add
    rollupOptions: {
      external: ["leaflet/dist/leaflet.css"],
    }
  2. And we install new version of Leaflet:
    yarn add leaflet