# Problem in yarn kbn bootstrap.Error: No module factory available for dependency type: CssDependency

**URL:** <https://discuss.elastic.co/t/problem-in-yarn-kbn-bootstrap-error-no-module-factory-available-for-dependency-type-cssdependency/311314>\
**Category:** Kibana\
**Created:** [August 3, 2022, 1:41pm UTC](https://discuss.elastic.co/t/problem-in-yarn-kbn-bootstrap-error-no-module-factory-available-for-dependency-type-cssdependency/311314 "2022-08-03T13:41:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wwh2077](https://avatars.discourse-cdn.com/v4/letter/w/e274bd/32.png) [@wwh2077](https://discuss.elastic.co/u/wwh2077)\
**Post date:** [August 3, 2022, 1:41pm UTC](https://discuss.elastic.co/t/problem-in-yarn-kbn-bootstrap-error-no-module-factory-available-for-dependency-type-cssdependency/311314/1 "2022-08-03T13:41:27Z")

</div>

I am trying to setup kibana 7.16 development environment and to bootstrap Kibana and install all the dependencies, I've to use this cmd **yarn kbn bootstrap**. Sadly, I've this message failed **[bootstrap] failed**.

```auto
$ yarn kbn bootstrap
yarn run v1.22.19
$ node scripts/kbn bootstrap
 succ [bazel_tools] all bazel tools are correctly installed
 info [bazel] INFO: Invocation ID: 95925035-9c92-46f3-b89f-4bc5e578b817
 info [bazel] INFO: Analyzed target //packages:build (1 packages loaded, 377 targets configured).
 info [bazel] INFO: Found 1 target...
 info [bazel] ERROR: D:/kibana/packages/kbn-ui-shared-deps-npm/BUILD.bazel:135:8: Action packages/kbn-ui-shared-deps-npm/shared_built_assets failed: (Exit 1): webpack-cli.bat failed: error executing command bazel-out/host/bin/external/npm/webpack-cli/bin/webpack-cli.bat --config packages/kbn-ui-shared-deps-npm/webpack.config.js --output-path ... (remaining 3 argument(s) skipped)
 info [bazel] Browserslist: caniuse-lite is outdated. Please run:
 info [bazel] npx browserslist@latest --update-db
 info [bazel] Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
 info [bazel] Error: No module factory available for dependency type: CssDependency
 info [bazel] at addDependency (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\Compilation.js:800:12)
 info [bazel] at iterationOfArrayCallback (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\Compilation.js:208:3)
 info [bazel] at addDependenciesBlock (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\Compilation.js:816:5)
 info [bazel] at Compilation.processModuleDependencies (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\Compilation.js:827:4)
 info [bazel] at afterBuild (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\Compilation.js:954:15)
 info [bazel] at C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\Compilation.js:998:11
 info [bazel] at callback (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\Compilation.js:734:5)
 info [bazel] at C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\Compilation.js:782:12
 info [bazel] at handleParseResult (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\NormalModule.js:478:12)
 info [bazel] at C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\NormalModule.js:500:6
 info [bazel] at C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\NormalModule.js:358:12
 info [bazel] at C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\loader-runner\lib\LoaderRunner.js:373:3
 info [bazel] at iterateNormalLoaders (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
 info [bazel] at C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\loader-runner\lib\LoaderRunner.js:186:6
 info [bazel] at context.callback (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
 info [bazel] at C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\external\npm\node_modules\mini-css-extract-plugin\dist\loader.js:216:12
 info [bazel] at C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\Compiler.js:343:11
 info [bazel] at C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\Compiler.js:681:15
 info [bazel] at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:15:1)
 info [bazel] at AsyncSeriesHook.lazyCompileHook (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\tapable\lib\Hook.js:154:20)
 info [bazel] at C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\Compiler.js:678:31
 info [bazel] at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
 info [bazel] at AsyncSeriesHook.lazyCompileHook (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\tapable\lib\Hook.js:154:20)
 info [bazel] at C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\Compilation.js:1423:35
 info [bazel] at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
 info [bazel] at AsyncSeriesHook.lazyCompileHook (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\tapable\lib\Hook.js:154:20)
 info [bazel] at C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\Compilation.js:1414:32
 info [bazel] at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
 info [bazel] at AsyncSeriesHook.lazyCompileHook (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\tapable\lib\Hook.js:154:20)
 info [bazel] at C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\webpack\lib\Compilation.js:1409:36
 info [bazel]
 info [bazel] C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\neo-async\async.js:16
 info [bazel] throw new Error('Callback was already called.');
 info [bazel] ^
 info [bazel] Error: Callback was already called.
 info [bazel] at throwError (C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\neo-async\async.js:16:11)
 info [bazel] at C:\users\night\_bazel_night\6nw4ondz\execroot\kibana\node_modules\neo-async\async.js:2818:7
 info [bazel] at processTicksAndRejections (node:internal/process/task_queues:78:11)
 info [bazel] Target //packages:build failed to build
 info [bazel] Use --verbose_failures to see the command lines of failed build steps.
 info [bazel] INFO: Elapsed time: 24.403s, Critical Path: 22.61s
 info [bazel] INFO: 3 processes: 3 internal.
 info [bazel]
ERROR [bootstrap] failed:
ERROR The bazel command that was running failed to complete.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [August 3, 2022, 6:40pm UTC](https://discuss.elastic.co/t/problem-in-yarn-kbn-bootstrap-error-no-module-factory-available-for-dependency-type-cssdependency/311314/2 "2022-08-03T18:40:46Z")

</div>

We've seen this issue occur in Windows when the Kibana repository is located on a drive other than C:. Moving the Kibana directory to the C:\ drive has usually fixed the issue.

You may also be able to overcome this by using [WSL](https://github.com/elastic/kibana/blob/main/dev_docs/tutorials/development_windows.mdx). However, this **might** only work with the latest releases of Kibana (\>=8.0).

---

<div class="post-metadata">

**Author:** ![wwh2077](https://avatars.discourse-cdn.com/v4/letter/w/e274bd/32.png) [@wwh2077](https://discuss.elastic.co/u/wwh2077)\
**Post date:** [August 7, 2022, 4:14pm UTC](https://discuss.elastic.co/t/problem-in-yarn-kbn-bootstrap-error-no-module-factory-available-for-dependency-type-cssdependency/311314/3 "2022-08-07T16:14:53Z")

</div>

I moved the project to the C:\ drive and this method did work. thank you very much。

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 4, 2022, 4:15pm UTC](https://discuss.elastic.co/t/problem-in-yarn-kbn-bootstrap-error-no-module-factory-available-for-dependency-type-cssdependency/311314/4 "2022-09-04T16:15:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
