Can't build the example with React
See original GitHub issueReproduction:
- Clone this repo:
git clone https://github.com/eirslett/storybook-builder-vite.git
- Go to the React example folder:
cd storybook-builder-vite/packages/example-react
- Install packages:
npm i
- Try to build the storybook app:
npm run build-storybook
💥🐛
Logs:
🚀 npm run build-storybook
> example-react@0.0.7 build-storybook D:\Software\Github\storybook-builder-vite\packages\example-react
> build-storybook
info @storybook/react v6.3.0-rc.10
info
info => Cleaning outputDir: D:\Software\Github\storybook-builder-vite\packages\example-react\storybook-static
info => Loading presets
ERR! Addon value should end in /register OR it should be a valid preset https://storybook.js.org/docs/react/addons/writing-presets/
ERR! @storybook/addon-links
vite v2.3.7 building for production...
transforming (1154) node_modules\@popperjs\core\lib\dom-utils\isTableElement.jsConflicting namespaces: "node_modules\@storybook\client-api\dist\esm\index.js" re-exports "combineParameters" from both "node_modules\@storybook\client-api\dist\esm\index.js" and "node_modules\@storybook\client-api\dist\esm\parameters.js" (will be ignored)
Conflicting namespaces: "node_modules\@storybook\components\dist\esm\index.js" re-exports "components" from both "node_modules\@storybook\components\dist\esm\index.js" and "node_modules\@storybook\components\dist\esm\typography\DocumentFormatting.js" (will be ignored)
Conflicting namespaces: "node_modules\@storybook\addon-docs\dist\esm\blocks\index.js" re-exports "SourceState" from both "node_modules\@storybook\addon-docs\dist\esm\blocks\Canvas.js" and "node_modules\@storybook\addon-docs\dist\esm\blocks\Source.js" (will be ignored)
Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
✓ 1180 modules transformed.
rendering chunks (7)...[vite:build-html] The "fileName" or "name" properties of emitted files must be strings that are neither absolute nor relative paths, received "../../../../../../iframe.html".
ERR! Error: The "fileName" or "name" properties of emitted files must be strings that are neither absolute nor relative paths, received "../../../../../../iframe.html".
ERR! at error (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\rollup\dist\shared\rollup.js:164:30)
ERR! at FileEmitter.emitFile (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\rollup\dist\shared\rollup.js:12942:24)
ERR! at Object.generateBundle (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\vite\dist\node\chunks\dep-bc228bbb.js:24622:22)
ERR! at async Bundle.generate (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\rollup\dist\shared\rollup.js:13388:9)
ERR! at async handleGenerateWrite (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\rollup\dist\shared\rollup.js:20791:23)
ERR! at async doBuild (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\vite\dist\node\chunks\dep-bc228bbb.js:45406:20)
ERR! at async build (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\vite\dist\node\chunks\dep-bc228bbb.js:45230:16)
ERR! at async build (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\storybook-builder-vite\build.js:27:5)
ERR! at async Promise.all (index 1)
ERR! at async buildStaticStandalone (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\@storybook\core-server\dist\cjs\build-static.js:141:28)
ERR! at async buildStatic (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\@storybook\core-server\dist\cjs\build-static.js:161:5)
ERR! Error: The "fileName" or "name" properties of emitted files must be strings that are neither absolute nor relative paths, received "../../../../../../iframe.html".
ERR! at error (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\rollup\dist\shared\rollup.js:164:30)
ERR! at FileEmitter.emitFile (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\rollup\dist\shared\rollup.js:12942:24)
ERR! at Object.generateBundle (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\vite\dist\node\chunks\dep-bc228bbb.js:24622:22)
ERR! at async Bundle.generate (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\rollup\dist\shared\rollup.js:13388:9)
ERR! at async handleGenerateWrite (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\rollup\dist\shared\rollup.js:20791:23)
ERR! at async doBuild (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\vite\dist\node\chunks\dep-bc228bbb.js:45406:20)
ERR! at async build (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\vite\dist\node\chunks\dep-bc228bbb.js:45230:16)
ERR! at async build (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\storybook-builder-vite\build.js:27:5)
ERR! at async Promise.all (index 1)
ERR! at async buildStaticStandalone (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\@storybook\core-server\dist\cjs\build-static.js:141:28)
ERR! at async buildStatic (D:\Software\Github\storybook-builder-vite\packages\example-react\node_modules\@storybook\core-server\dist\cjs\build-static.js:161:5) {
ERR! code: 'PLUGIN_ERROR',
ERR! pluginCode: 'VALIDATION_ERROR',
ERR! plugin: 'vite:build-html',
ERR! hook: 'generateBundle'
ERR! }
System Info:
System:
OS: Windows 10 10.0.19041
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 4.82 GB / 15.87 GB
Binaries:
Node: 12.22.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.12 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.964.0), Chromium (91.0.864.41)
Internet Explorer: 11.0.19041.1
npmPackages:
vite: ^2.3.7 => 2.3.7
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Can't build the example with React · Issue #31 - GitHub
Go to the React example folder: cd storybook-builder-vite/packages/example-react; Install packages: npm i; Try to build the storybook app: npm ...
Read more >Can't build create-react-app project with custom PUBLIC_URL
I'm trying. PUBLIC_URL=http://example.com npm run build.
Read more >How to fix build failures with `create-react-app` in production
If your build is using create-react-app and has been failing since approximately the 18th of June 2020, this post will help you fix...
Read more >How To Set Up a React Project with Create React App
You'll make your first changes to React code, update styles, and run a build to create a fully minified version of your application....
Read more >Thinking in React
Step 1: Break The UI Into A Component Hierarchy · Step 2: Build A Static Version in React · Step 3: Identify The...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sure, I’ll do it today or tomorrow at the latest
@mitow7821 would you mind opening a new issue for this one so it doesn’t get lost in the shuffle? Thanks!