Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing dependencies with yarn install fails when packages/cesium is present #702

Open
niktayv opened this issue Nov 3, 2024 · 0 comments

Comments

@niktayv
Copy link

niktayv commented Nov 3, 2024

I am trying to enable a custom custom version of Cesium, following the documentation:

The commands that I use:

export NODE_OPTIONS=--max_old_space_size=4096
git clone [email protected]:TerriaJS/TerriaMap.git
grep terriajs package.json
    "terriajs": "8.7.5",
mkdir packages
cd packages
git clone [email protected]:TerriaJS/terriajs.git
cd terriajs
git checkout 8.7.5
cd ..
git clone -b terriajs [email protected]:TerriaJS/cesium.git
cd cesium
grep version package.json
  "version": "1.92.0-tile-error-provider-fix-2",
cd ../..
yarn install

The versions I use are:

  • Node 16.13.1
  • Npm 8.1.2
  • Yarn 1.19.0

In TerriaMap/package.json I made the following modifications:

{
   "workspaces": {
    "packages": [
      "packages/terriajs",
      "packages/cesium"
    ],
    "nohoist": [
      "**/husky"
    ]
  },
  "name": "terriajs-map",
  "version": "0.2.1",
  "devDependencies": {
  // ...
    "terriajs-cesium": "1.92.0-tile-error-provider-fix-2",
  },
  // ...
}

In TerriaMap/packages/terriajs/package.json, I set the same version of terria-cesium as well:

{
  "name": "terriajs",
  "version": "8.7.5",
// ...
  "dependencies": {
    "terriajs-cesium": "1.92.0-tile-error-provider-fix-2",
  },
// ...
}

Running yarn install fails with the following error:

error /Users/yuriv/Temp/TerriaMap/node_modules/terriajs-cesium: Command failed.
Exit code: 1
Command: bash -c "if [ ! -d "./wwwroot/build" ]; then gulp -f gulpfile.cjs terria-prepare-cesium; fi"
Arguments: 
Directory: /Users/yuriv/Temp/TerriaMap/node_modules/terriajs-cesium
Output:
[10:59:53] Using gulpfile ~/Temp/TerriaMap/packages/cesium/gulpfile.cjs
[10:59:53] Starting 'terria-prepare-cesium'...
[10:59:53] Starting 'prepare'...
[10:59:53] 'prepare' errored after 3.36 ms
[10:59:53] Error: Package subpath './dist/z-worker-pako.js' is not defined by "exports" in /Users/yuriv/Temp/TerriaMap/node_modules/@zip.js/zip.js/package.json
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:440:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:692:3)
    at resolveExports (node:internal/modules/cjs/loader:482:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.resolve (node:internal/modules/cjs/helpers:108:19)
    at /Users/yuriv/Temp/TerriaMap/packages/cesium/gulpfile.cjs:390:13
    at taskWrapper (/Users/yuriv/Temp/TerriaMap/node_modules/undertaker/lib/set-task.js:13:15)
    at bound (node:domain:421:15)
    at runBound (node:domain:432:12)

How can I get yarn install to work with packages/cesium linked?

The problem I am trying to solve by doing so is the WMS highlight issue, which has partly been solved in the mentioned version of terrains-cesium but not in the version 8.0.0, which comes out of the box now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant