Code Monkey home page Code Monkey logo

nx-vite-storybook-issue-repro's Introduction

Reproduction repository

Importing import { getSomethingFromDomain } from '@repro-app/domain-something'; In libs/ui/components/src/lib/IconRSSI/IconRSSI.stories.tsx

and running npm run storybook

breaks the story :

23:27:15 [vite] Internal server error: Failed to resolve import "@repro-app/domain-something" from "libs/ui/components/src/lib/IconRSSI/IconRSSI.stories.tsx". Does the file exist?
  Plugin: vite:import-analysis
  File: /home/jalil/code/repro/libs/ui/components/src/lib/IconRSSI/IconRSSI.stories.tsx:16:41
  14 |    window.$RefreshSig$ = RefreshRuntime.createSignatureFunctionForTransform;
  15 |  }
  16 |  import { getSomethingFromDomain } from "@repro-app/domain-something";
     |                                          ^
  17 |  import { IconRSSI } from "./";
  18 |  export default {
      at formatError (file:///home/jalil/code/repro/node_modules/vite/dist/node/chunks/dep-f7d05e3f.js:42597:46)
      at TransformContext.error (file:///home/jalil/code/repro/node_modules/vite/dist/node/chunks/dep-f7d05e3f.js:42593:19)
      at normalizeUrl (file:///home/jalil/code/repro/node_modules/vite/dist/node/chunks/dep-f7d05e3f.js:40509:33)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async file:///home/jalil/code/repro/node_modules/vite/dist/node/chunks/dep-f7d05e3f.js:40652:47
      at async Promise.all (index 3)
      at async TransformContext.transform (file:///home/jalil/code/repro/node_modules/vite/dist/node/chunks/dep-f7d05e3f.js:40578:13)
      at async Object.transform (file:///home/jalil/code/repro/node_modules/vite/dist/node/chunks/dep-f7d05e3f.js:42871:30)
      at async loadAndTransform (file:///home/jalil/code/repro/node_modules/vite/dist/node/chunks/dep-f7d05e3f.js:53335:29)

But if I remove this import, the story works well.

Strange thing is that if I do the same import/usage in apps/operating-app/src/DarkModeToggle.stories.tsx from the same domain lib, it works well

nx-vite-storybook-issue-repro's People

Contributors

jalilarfaoui avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.