opensearch-project / dashboards-maps

:globe_with_meridians: User interface for the backend geospatial plugin which can be integrated with OpenSearch Dashboards and a home for all other map related features.
https://opensearch.org/docs/latest/dashboards/geojson-regionmaps/#custom-vector-maps-with-geojson
Apache License 2.0
17 stars 44 forks source link

[BUG] Build failed on 2.x branch #569

Closed ruanyl closed 7 months ago

ruanyl commented 8 months ago

What is the bug?

dashboards-maps git:(2.x) yarn build
yarn run v1.22.19
$ yarn plugin-helpers build
$ node ../../scripts/plugin_helpers build
 info Loaded config file from [/Users/ruanyl/project/OpenSearch-Dashboards-latest/plugins/dashboards-maps/.opensearch_dashboards-plugin-helpers.json]
 info deleting the build and target directories
 info running @osd/optimizer
 │ info initialized, 0 bundles cached
 │ info starting worker [1 bundle]
 │ERROR webpack compile errors
     │ERROR [customImportMapDashboards] build
         │ERROR Optimizations failure.
         │         1 module
         │
         │          ERROR in /Users/ruanyl/project/OpenSearch-Dashboards-latest/packages/osd-optimizer/target/worker/entry_point_creator.js
         │          Module build failed (from /Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/babel-loader/lib/index.js):
         │          Error: Cannot find module '@babel/plugin-proposal-class-properties'
         │          Require stack:
         │          - /Users/ruanyl/project/OpenSearch-Dashboards-latest/plugins/dashboards-maps/babel.config.js
         │          - /Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/@babel/core/lib/config/files/module-types.js
         │          - /Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/@babel/core/lib/config/files/configuration.js
         │          - /Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/@babel/core/lib/config/files/index.js
         │          - /Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/@babel/core/lib/index.js
         │          - /Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/babel-loader/lib/index.js
         │          - /Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/loader-runner/lib/loadLoader.js
         │          - /Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/loader-runner/lib/LoaderRunner.js
         │          - /Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/webpack/lib/NormalModule.js
         │          - /Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/webpack/lib/NormalModuleFactory.js
         │          - /Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/webpack/lib/Compiler.js
         │          - /Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/webpack/lib/webpack.js
         │          - /Users/ruanyl/project/OpenSearch-Dashboards-latest/packages/osd-optimizer/target/worker/run_compilers.js
         │          - /Users/ruanyl/project/OpenSearch-Dashboards-latest/packages/osd-optimizer/target/worker/run_worker.js
         │              at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
         │              at Function.Module._load (node:internal/modules/cjs/loader:920:27)
         │              at Module.require (node:internal/modules/cjs/loader:1141:19)
         │              at require (node:internal/modules/cjs/helpers:110:18)
         │              at Object.<anonymous> (/Users/ruanyl/project/OpenSearch-Dashboards-latest/plugins/dashboards-maps/babel.config.js:13:5)
         │              at Module._compile (node:internal/modules/cjs/loader:1254:14)
         │              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
         │              at Module.load (node:internal/modules/cjs/loader:1117:32)
         │              at Function.Module._load (node:internal/modules/cjs/loader:958:12)
         │              at Module.require (node:internal/modules/cjs/loader:1141:19)
         │              at require (node:internal/modules/cjs/helpers:110:18)
         │              at loadPartialConfigAsync (/Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/@babel/core/src/config/index.ts:44:61)
         │              at Object.<anonymous> (/Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/babel-loader/lib/index.js:155:26)
         │              at Generator.next (<anonymous>)
         │              at asyncGeneratorStep (/Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/babel-loader/lib/index.js:3:103)
         │              at _next (/Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/babel-loader/lib/index.js:5:194)
         │              at /Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/babel-loader/lib/index.js:5:364
         │              at new Promise (<anonymous>)
         │              at Object.<anonymous> (/Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/babel-loader/lib/index.js:5:97)
         │              at Object._loader (/Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/babel-loader/lib/index.js:245:18)
         │              at Object.loader (/Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/babel-loader/lib/index.js:64:18)
         │              at Object.<anonymous> (/Users/ruanyl/project/OpenSearch-Dashboards-latest/node_modules/babel-loader/lib/index.js:59:12)
 │ERROR webpack issue

How can one reproduce the bug?

Steps to reproduce the behavior.

What is the expected behavior?

A clear and concise description of what you expected to happen.

What is your host/environment?

Operating system, version.

Do you have any screenshots?

If applicable, add screenshots to help explain your problem.

Do you have any additional context?

Add any other context about the problem.

ryanbogan commented 7 months ago

Addressed in https://github.com/opensearch-project/dashboards-maps/pull/574