Comments (5)
+1
Created a new ember project + used storybook npx command to add storybook to it, and I'm getting this error
global_1.global.require is not a function
TypeError: global_1.global.require is not a function
at loadEmberApp (http://localhost:6006/vendors-node_modules_storybook_addon-essentials_dist_actions_preview_js-node_modules_storyboo-9ecee6.iframe.bundle.js:1148:36)
at ./node_modules/@storybook/ember/dist/client/preview/render.js (http://localhost:6006/vendors-node_modules_storybook_addon-essentials_dist_actions_preview_js-node_modules_storyboo-9ecee6.iframe.bundle.js:1155:13)
at __webpack_require__ (http://localhost:6006/runtime~main.iframe.bundle.js:28:33)
at fn (http://localhost:6006/runtime~main.iframe.bundle.js:313:21)
at ./node_modules/@storybook/ember/dist/client/preview/config.js (http://localhost:6006/vendors-node_modules_storybook_addon-essentials_dist_actions_preview_js-node_modules_storyboo-9ecee6.iframe.bundle.js:1018:16)
at __webpack_require__ (http://localhost:6006/runtime~main.iframe.bundle.js:28:33)
at fn (http://localhost:6006/runtime~main.iframe.bundle.js:313:21)
at PreviewWeb.getProjectAnnotations (http://localhost:6006/main.iframe.bundle.js:124:75)
at PreviewWeb.getProjectAnnotationsOrRenderError (http://localhost:6006/sb-preview/runtime.js:129:6367)
at PreviewWeb.initialize (http://localhost:6006/sb-preview/runtime.js:129:5672)
```
from storybook.
I get a similar error when upgrading from 6.5 to 8.
from storybook.
I think by now, ember ships with embroider
build system active by default now. However, under storybook, you need to run the ember app the "classic" way with app.toTree()
.
If you only have one app, you can still make it possible by using an ENV
var, e.g. you can start ember like so: STORYBOOK=true ember serve
and in ember-cli-build.js
you can detect that and run your logic. You might also run additional customizations to make your app run for storybook. Then put this in your package.json
and do: pnpm start:storybook
so nobody needs to remember the env var.
We have a chicken and egg... "race condition". When app v2 is defined, there might be @storybook/ember-webpack
rsp @storybook/ember-vite
packages for the respective loaders.
from storybook.
My app is running the classic way but I do have issue when running storybook@8 on it
from storybook.
For me, this error went away after adding staticDirs
in my .storybook/main.js
file.
from storybook.
Related Issues (20)
- [Bug]: First story dispayed in place of every other one in Docs (sb8 webcomponent) HOT 2
- [Project SfC]: Bug - X button is a bit unaligned
- [Project SfC]: Bug - Search input caret position ignored
- On Setting viewport to 320*256 pixels, Keyboard focus is moving to the hidden controls.[Bug]:
- [Bug]: Vite HMR Issue
- [Bug]: Response cookies are not available from the middleware
- [Bug]: Failure in Upgrading Storybook
- [Bug]: Importing anything that contains a word `raw` in NextJS+Storybook project from ant-design makes every other import null HOT 2
- [Bug] :Storybook + vite shows "No Preview" but story still renders below
- Warn when a story is rendered in portable stories when there are lingering cleanup functions
- [Bug]: Module not found error when using CommonJS entry point in @storybook/test HOT 1
- [Bug]: v8 Loading @emotion/react more than once warning HOT 1
- [Bug]: Error with static storybook HOT 2
- [Bug]: Configuration options don't seem to get passed on to vitest HOT 2
- [Bug]: Next 14.2.2 [ yarn dlx sb init -> running storybook error ] HOT 1
- [Tracking] On-going effort to fix flakey tests
- [Bug]: Empty index.html
- [Bug]: docs tab not display in storybook ui HOT 3
- [Bug]: defaultProps Warnings HOT 1
- [Bug]: Failed to execute 'insertRule' on 'CSSStyleSheet' : Storybook 8.0.6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storybook.