Bug: ./mach storybook is broken with latest pull from mozilla-central
Status: RESOLVED
Priority: --
Resolution: FIXED
Created: 2023-01-23 21:16:46+00:00
Resolved: 2023-01-24 09:35:46+00:00

With `52f9e6382dce` checked out, running `./mach storybook` yields:

```
WARN Force closed manager build
ModuleNotFoundError: Module not found: Error: Can't resolve 'lit' in '/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/stories'
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/webpack/lib/Compilation.js:2016:28
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/webpack/lib/NormalModuleFactory.js:798:13
    at eval (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/webpack/lib/NormalModuleFactory.js:270:22
    at eval (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/webpack/lib/NormalModuleFactory.js:434:22
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/webpack/lib/NormalModuleFactory.js:116:11
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/webpack/lib/NormalModuleFactory.js:670:25
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/webpack/lib/NormalModuleFactory.js:855:8
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/webpack/lib/NormalModuleFactory.js:975:5
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/neo-async/async.js:6883:13
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/webpack/lib/NormalModuleFactory.js:958:45
    at finishWithoutResolve (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/Resolver.js:312:11)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/Resolver.js:386:15
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/Resolver.js:435:5
    at eval (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/Resolver.js:435:5
    at eval (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:87:43
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/Resolver.js:435:5
    at eval (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/forEachBail.js:16:12
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/AliasPlugin.js:125:14
    at next (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/forEachBail.js:14:3)
    at forEachBail (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/forEachBail.js:24:9)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/AliasPlugin.js:51:5
    at _next0 (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:8:1)
    at eval (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:30:1)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/Resolver.js:435:5
    at eval (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/Resolver.js:435:5
    at eval (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/Resolver.js:435:5
    at eval (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:87:43
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/Resolver.js:435:5
    at eval (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/ConditionalPlugin.js:40:47
    at _next0 (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:8:1)
    at eval (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:30:1)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/Resolver.js:435:5
    at eval (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:132:1)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/ConditionalPlugin.js:53:42
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/Resolver.js:435:5
    at eval (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/Resolver.js:435:5
    at eval (eval at create (/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/enhanced-resolve/lib/FileExistsPlugin.js:38:14
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
resolve 'lit' in '/Users/mikeconley/Projects/mozilla-central/browser/components/storybook/stories'
  Parsed request is a module
  using description file: /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/package.json (relative path: ./stories)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/stories/node_modules doesn't exist or is not a directory
      looking for modules in /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules
        single file module
          using description file: /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/package.json (relative path: ./node_modules/lit)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/lit doesn't exist
            .mjs
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/lit.mjs doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/lit.js doesn't exist
            .jsx
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/lit.jsx doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/lit.ts doesn't exist
            .tsx
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/lit.tsx doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/lit.json doesn't exist
            .cjs
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/lit.cjs doesn't exist
        /Users/mikeconley/Projects/mozilla-central/browser/components/storybook/node_modules/lit doesn't exist
      /Users/mikeconley/Projects/mozilla-central/browser/components/node_modules doesn't exist or is not a directory
      /Users/mikeconley/Projects/mozilla-central/browser/node_modules doesn't exist or is not a directory
      looking for modules in /Users/mikeconley/Projects/mozilla-central/node_modules
        single file module
          using description file: /Users/mikeconley/Projects/mozilla-central/package.json (relative path: ./node_modules/lit)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/node_modules/lit doesn't exist
            .mjs
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/node_modules/lit.mjs doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/node_modules/lit.js doesn't exist
            .jsx
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/node_modules/lit.jsx doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/node_modules/lit.ts doesn't exist
            .tsx
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/node_modules/lit.tsx doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/node_modules/lit.json doesn't exist
            .cjs
              Field 'browser' doesn't contain a valid alias configuration
              /Users/mikeconley/Projects/mozilla-central/node_modules/lit.cjs doesn't exist
        /Users/mikeconley/Projects/mozilla-central/node_modules/lit doesn't exist
      /Users/mikeconley/Projects/node_modules doesn't exist or is not a directory
      looking for modules in /Users/mikeconley/node_modules
        single file module
          No description file found in /Users/mikeconley/node_modules or above
          no extension
            Field 'browser' doesn't contain a valid alias configuration
            /Users/mikeconley/node_modules/lit doesn't exist
          .mjs
            Field 'browser' doesn't contain a valid alias configuration
            /Users/mikeconley/node_modules/lit.mjs doesn't exist
          .js
            Field 'browser' doesn't contain a valid alias configuration
            /Users/mikeconley/node_modules/lit.js doesn't exist
          .jsx
            Field 'browser' doesn't contain a valid alias configuration
            /Users/mikeconley/node_modules/lit.jsx doesn't exist
          .ts
            Field 'browser' doesn't contain a valid alias configuration
            /Users/mikeconley/node_modules/lit.ts doesn't exist
          .tsx
            Field 'browser' doesn't contain a valid alias configuration
            /Users/mikeconley/node_modules/lit.tsx doesn't exist
          .json
            Field 'browser' doesn't contain a valid alias configuration
            /Users/mikeconley/node_modules/lit.json doesn't exist
          .cjs
            Field 'browser' doesn't contain a valid alias configuration
            /Users/mikeconley/node_modules/lit.cjs doesn't exist
        /Users/mikeconley/node_modules/lit doesn't exist
      /Users/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory

WARN Broken build, fix the error above.
WARN You may need to refresh the browser.
```

Blowing away my browser/components/storybook/node_modules folder and re-running `./mach storybook install` didn't help.

mstriemer mentioned that part of the problem is this story: https://searchfox.org/mozilla-central/rev/c5eeb9f4fcfe52b028e7774054444f2982feccc3/browser/components/storybook/stories/credential-management.stories.mjs#5, which should be importing `lit.all.mjs` instead.