Skip to content

Storybook fails after upgrading to Engine 2.9.x #441

@willeastcott

Description

@willeastcott

It's due to this line in the engine:

https://github.com/playcanvas/engine/blob/115deee5114deb2966cbefa79c5377eb9426652e/src/scene/gsplat/gsplat-sort-worker.js#L3

Console output:

C:\dev\playcanvas\pcui>npm run storybook

> @playcanvas/[email protected] storybook
> storybook dev -p 9000

@storybook/core v8.6.12

info => Starting manager..
info => Starting preview..
info Addon-docs: using MDX3
info => Using implicit CSS loaders
info => Using default Webpack5 setup
<i> [webpack-dev-middleware] wait until bundle finished
10% building 0/2 entries 3/6 dependencies 0/2 modulesinfo Using tsconfig paths for react-docgen
ERROR in node:worker_threads
Module build failed: UnhandledSchemeError: Reading from "node:worker_threads" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
    at C:\dev\playcanvas\pcui\node_modules\webpack\lib\NormalModule.js:1014:10
    at Hook.eval [as callAsync] (eval at create (C:\dev\playcanvas\pcui\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\dev\playcanvas\pcui\node_modules\tapable\lib\Hook.js:18:14)
    at Object.processResource (C:\dev\playcanvas\pcui\node_modules\webpack\lib\NormalModule.js:1010:8)
    at processResource (C:\dev\playcanvas\pcui\node_modules\loader-runner\lib\LoaderRunner.js:220:11)
    at iteratePitchingLoaders (C:\dev\playcanvas\pcui\node_modules\loader-runner\lib\LoaderRunner.js:171:10)
    at runLoaders (C:\dev\playcanvas\pcui\node_modules\loader-runner\lib\LoaderRunner.js:398:2)
    at NormalModule._doBuild (C:\dev\playcanvas\pcui\node_modules\webpack\lib\NormalModule.js:995:3)
    at NormalModule.build (C:\dev\playcanvas\pcui\node_modules\webpack\lib\NormalModule.js:1184:15)
    at C:\dev\playcanvas\pcui\node_modules\webpack\lib\Compilation.js:1519:12
    at NormalModule.needBuild (C:\dev\playcanvas\pcui\node_modules\webpack\lib\NormalModule.js:1525:32)
    at Compilation._buildModule (C:\dev\playcanvas\pcui\node_modules\webpack\lib\Compilation.js:1500:10)
    at C:\dev\playcanvas\pcui\node_modules\webpack\lib\util\AsyncQueue.js:340:10
    at Hook.eval [as callAsync] (eval at create (C:\dev\playcanvas\pcui\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncQueue._startProcessing (C:\dev\playcanvas\pcui\node_modules\webpack\lib\util\AsyncQueue.js:330:26)
    at AsyncQueue._ensureProcessing (C:\dev\playcanvas\pcui\node_modules\webpack\lib\util\AsyncQueue.js:317:12)
    at process.processImmediate (node:internal/timers:491:21)
 @ ./node_modules/playcanvas/build/playcanvas.dbg/src/scene/gsplat/gsplat-sort-worker.js 3:58-99
 @ ./node_modules/playcanvas/build/playcanvas.dbg/src/scene/gsplat/gsplat-sorter.js 4:0-53 25:33-52
 @ ./node_modules/playcanvas/build/playcanvas.dbg/src/scene/gsplat/gsplat-instance.js 6:0-50 76:26-38
 @ ./node_modules/playcanvas/build/playcanvas.dbg/src/index.js 138:0-67 138:0-67
 @ ./src/components/GradientPicker/index.ts 1:0-51 487:48-56 489:17-25 644:22-32 645:22-32 654:22-32 663:22-32 944:28-38 1235:30-35 1245:30-40
 @ ./src/components/GradientPicker/component.tsx 4:0-64 10:28-47 23:22-41
 @ ./src/components/GradientPicker/component.stories.tsx 3:0-45 7:13-27 11:39-53
 @ ./src/ lazy ^\.\/.*$ include: (?%21.*node_modules)(?:[\\/]src(?:[\\/](?%21\.)(?:(?:(?%21(?:^%7C[\\/])\.).)*?)[\\/]%7C[\\/]%7C$)(?%21\.)(?=.)[^\\/]*?\.stories\.tsx)$ chunkName: [request] namespace object ./components/GradientPicker/component.stories.tsx ./components/GradientPicker/component.stories
 @ ./storybook-stories.js 10:11-14:5
 @ ./storybook-config-entry.js 7:0-50 28:31-39 35:2-38:4 35:58-38:3 37:31-39

preview compiled with 1 error

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdependenciesPull requests that update a dependency file

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions