You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not entirely sure the framing of the issue title is correct. But maybe!
While reviewing #510, I noticed that the story for AddDataInstructions threw an error: Cannot access uninitialized variable. I don't see this error when running Storybook locally, but it's been a problem on all the deployed versions.
I have a suspicion that the culprit is process.env.REACT_APP_API_URL. This is the first time an environment variable shows up in Storybook-accessible code. I'm guessing that the Storybook build process doesn't know about it.
This commit changes where we pluck the API URL off our env vars to pass
them into our `NewBulkUploadPanel` component.
Previously, we read the env var directly within the component. This is
the first time a component accessed env vars, and presented an issue
with our Storybook story (#526).
Now, we pass it into the prop from the page. While this would still
present a Storybook issue if we tried to render that page, it resolves
our current dilemma.
Issue #514 Implement new layout/copy on New Bulk Upload page
Issue #526 Storybook doesn't build with env vars?
Since #533 we no longer trigger this issue because I moved the env var out of the component in question, to its surrounding page (which isn't loaded into Storybook). But we should still come up with a solution to this, if for no other reason than to educate ourselves.
I'm not entirely sure the framing of the issue title is correct. But maybe!
While reviewing #510, I noticed that the story for AddDataInstructions threw an error:
Cannot access uninitialized variable.
I don't see this error when running Storybook locally, but it's been a problem on all the deployed versions.I have a suspicion that the culprit is
process.env.REACT_APP_API_URL
. This is the first time an environment variable shows up in Storybook-accessible code. I'm guessing that the Storybook build process doesn't know about it.This isn't a crisis, but we should fix!
Possible reference:
The text was updated successfully, but these errors were encountered: