Storybook + Vite no loader is configured for .node files

I’m trying to setup Storybook 8.2 with Vite. Here is my storybook config:

import type { StorybookConfig } from "@storybook/react-vite";

import { nxViteTsPaths } from "@nx/vite/plugins/nx-tsconfig-paths.plugin";
import { mergeConfig } from "vite";
import { UserConfig } from "vite";

const config: StorybookConfig = {
  stories: ["../../../../packages/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
  framework: {
    name: "@storybook/react-vite",
    options: {
      builder: {
        viteConfigPath: "../../../vite.config.ts"
      }
    }
  },
  refs: {
    next: {
      title: "Next.js",
      url: "http://localhost:7007"
    }
  },
  viteFinal: async (config: UserConfig) =>
    mergeConfig(config, {
      plugins: [nxViteTsPaths()],
      build: {
        rollupOptions: {
          external: [
            "universal-fs",
            "packages/etech-ui-utils/**",
            "@ngrok/ngrok-darwin-arm64",
            "@ngrok/ngrok-darwin-universal"
          ]
        }
      }
    })
};

export default config;

// To customize your Vite configuration you can use the viteFinal field.
// Check https://storybook.js.org/docs/react/builders/vite#configuration
// and https://nx.dev/recipes/storybook/custom-builder-configs

However, when running npx storybook dev I get an error:

✘ [ERROR] No loader is configured for ".node" files: ../../../node_modules/.pnpm/@[email protected]/node_modules/@ngrok/ngrok-darwin-arm64/ngrok.darwin-arm64.node

    ../../../node_modules/.pnpm/@[email protected]/node_modules/@ngrok/ngrok/index.js:141:36:
      141 │             nativeBinding = require('@ngrok/ngrok-darwin-arm64')
          ╵                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~

✘ [ERROR] No loader is configured for ".node" files: ../../../node_modules/.pnpm/@[email protected]/node_modules/@ngrok/ngrok-darwin-universal/ngrok.darwin-universal.node

    ../../../node_modules/.pnpm/@[email protected]/node_modules/@ngrok/ngrok/index.js:116:32:
      116 │         nativeBinding = require('@ngrok/ngrok-darwin-universal')
          ╵                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/Users/ekrich/git/etech-ui/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_/node_modules/storybook/bin/index.cjs:23
  throw error;
  ^

Error: Build failed with 3 errors:
../../../node_modules/.pnpm/@[email protected]/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js:86:21: ERROR: No loader is configured for ".html" files: ../../../node_modules/.pnpm/@[email protected]/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html
../../../node_modules/.pnpm/@[email protected]/node_modules/@ngrok/ngrok/index.js:116:32: ERROR: No loader is configured for ".node" files: ../../../node_modules/.pnpm/@[email protected]/node_modules/@ngrok/ngrok-darwin-universal/ngrok.darwin-universal.node
../../../node_modules/.pnpm/@[email protected]/node_modules/@ngrok/ngrok/index.js:141:36: ERROR: No loader is configured for ".node" files: ../../../node_modules/.pnpm/@[email protected]/node_modules/@ngrok/ngrok-darwin-arm64/ngrok.darwin-arm64.node
    at failureErrorWithLog (/Users/ekrich/git/etech-ui/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1472:15)
    at /Users/ekrich/git/etech-ui/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:945:25
    at /Users/ekrich/git/etech-ui/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1353:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errors: [Getter/Setter],
  warnings: [Getter/Setter]
}

Node.js v22.5.1

It’s worth noting that I’m in an NX monorepo this storybook is nested in apps/storybook/vite-react. There are other dependencies that are problematic so I’m trying to ignore them with rollup options. However, I still get the error.

I have tried several Github suggestions without luck. Essentialy I want Vite to only watch where stories are found. How can I do that?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật