Docker ERROR: /opensearch-dashboards/node_modules/sass-embedded-linux-x64/dart-sass/src/dart ENOENT

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

OpenSearch Dashboards 2.18.0

Describe the issue:

I’m currently downloading the github of the OpenSearch Dashboards and I’m within the branch of 2.18.0. I made several to the UI and the “opensearch_dashboards.yml” to meet my needs. I then bundle the folder into a tar so a Dockerfile (outside of the environment) is able to use it, extract it inside the Dockerfile and pretty much do the “yarn osd bootstrap” and proceed with the “yarn build platform --linux” command (running it with alpine linux), the latter one causing the issue.

For some reason though I’m getting this weird error with the node module of dart-sass from the sass-embedded node module. I verified that the node module exists, so the issue must be somewhere else. This is the full stack trace:

DOCKER> â?? warn worker stderr Error: spawn /opensearch-dashboards/node_modules/sass-embedded-linux-x64/dart-sass/src/dart ENOENT
   â?? warn worker stderr     at Process.ChildProcess._handle.onexit (node:internal/child_process:284:19)
   â?? warn worker stderr     at onErrorNT (node:internal/child_process:477:16)
   â?? warn worker stderr     at processTicksAndRejections (node:internal/process/task_queues:82:21)
[INFO] DOCKER> â??ERROR failure 6 sec
[INFO] DOCKER> â??ERROR Error: worker exitted unexpectedly with code 1 [last message: { bundleId: 'embeddable', type: 'running' }]
   â??          at MapSubscriber.project (/opensearch-dashboards/packages/osd-optimizer/src/optimizer/observe_worker.ts:236:25)
   â??          at MapSubscriber._next (/opensearch-dashboards/node_modules/rxjs/src/internal/operators/map.ts:84:29)
   â??          at MapSubscriber.Subscriber.next (/opensearch-dashboards/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
   â??          at ChildProcess.handler (/opensearch-dashboards/node_modules/rxjs/src/internal/observable/fromEvent.ts:199:20)
   â??          at ChildProcess.emit (node:events:529:35)
   â??          at Process.ChildProcess._handle.onexit (node:internal/child_process:292:12)

I’m not exactly sure what that means. Mind you, the exact changes and same Dockerfile worked for me with the version 2.11.0, our changes are pretty minimal and while the newest version does change a bit of the code in the UI, I made sure that the changes integrate with the latest version. Something must have changed in this version for it to stop working.
Can anybody elaborate more on the error, is there a fix for this?

NOTE: every time I run the docker command I get the error on different plugins, it’s not necessarily always on the “embeddable” plugin.

Configuration:

  • Running it with node:18-alpine3.21 to build the platform

Relevant Logs or Screenshots: