Closed bfitch closed 2 years ago
Any update on this? I am still facing the same issue.
@bfitch would you have a project that I can look at that shows this experience?
@gabrielcsapo I'm sorry. I don't have a repo I can share publicly.
@bfitch are the assets you are looking for shown in the output for test/index.html when you start tests? Also are you using engines for any of this?
I faced the same issue and linked it to the way embler-cli was configured in the ember-cli-build.js
file of my project.
storeConfigInMeta
was set to false in the options, which prevented the injection of meta name="*/config/environment"
tag in the generated index.html
, which embler-cli-storybook looks for in parse()
of utils.js as you mentioned
Setting storeConfigInMeta: true
allowed ember serve and storybook to run
This is quite simple to fix, you just need to add this line at the beginning of removeRootURL()
in util.js
:
if(!config.meta.length) return config;
I'm not sure about the process of getting a PR open for this, will just fork the repo for now.
Thank you for this excellent addon! And for your work to bring storybook to Ember users 🙌.
While running
ember serve
after following the (workaround) install instructions in this issue:I'm getting a
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'content' of undefined
error.The fuller stacktrace is:
From my initial debugging, it looks like the
parse()
method in util.js is expecting a meta tag with a URLencoded representation of the host app'sconfig/environment.js
file?According to the corresponding test for
parse()
, it's expecting a JS object that looks like:But, while running
ember serve
andconsole.log
ing theconfig
value (inremoveRootURL()
), that meta tag appears to be missing, which is what's causing the rejected promise:I'm at the limits of my understanding of the addon build process, but it seems that that meta tag, with the expected config, is dynamically built and injected into
index.html
in the broccoli build process, but it's not there for some reason.Is there a a missing file or config option I'm missing or a workaround so I can get storybook to load when I run
yarn run storybook
?Thank you!
node:
10.15.0
ember-source:3.15.0
@storybook/ember:5.3.19
@storybook/ember-cli-storybook:0.2.1