storybook-experimental-vite's Issues
Aliased imports mocks
Extend storybook examples
- Typescript
- scss files/top-level app styling
- Aliased imports like
$app/env
Ensure storybook can build and that the built files can be served
As of #7 , it looks like the storybook-build
script runs to completion.
However, errors pop up when attempting to serve the files:
โฏ npx http-server ./storybook-static
Starting up http-server, serving ./storybook-static
http-server version: 14.1.1
http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none
Available on:
http://127.0.0.1:8080
http://192.168.1.92:8080
Hit CTRL-C to stop the server
[2022-07-06T16:22:11.288Z] "GET /" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
(node:26146) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
(Use `node --trace-deprecation ...` to show where the warning was created)
[2022-07-06T16:22:14.949Z] "GET /" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
[2022-07-06T16:22:15.053Z] "GET /favicon.ico" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
[2022-07-06T16:22:19.502Z] "GET /7.480c60c60f21bf435941.manager.bundle.js" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
[2022-07-06T16:22:19.503Z] "GET /7.480c60c60f21bf435941.manager.bundle.js" Error (404): "Not found"
[2022-07-06T16:22:19.538Z] "GET /iframe.html?viewMode=story&id=*" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
[2022-07-06T16:22:19.538Z] "GET /iframe.html?viewMode=story&id=*" Error (404): "Not found"
- Add build dir to gitignore
- storybook-build runs to completion.
- Built files can be served without incident
[vite] Internal server error
Well, it's trying to work ๐
OS: Windows 11
Node: 16.13.2
- [vite] Internal server error: Failed to resolve import "@mdx-js/react" from "src\stories\Introduction.stories.mdx". Does the file exist?
oneezy@oneezy MINGW64 ~/Desktop/www/7.Testing/storybook-experimental-vite
$ npm run storybook
> storybook-experimental-vite@0.0.1 storybook
> npm run build && start-storybook -p 6006
> storybook-experimental-vite@0.0.1 build
> svelte-kit build
(node:11076) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
vite v2.9.13 building for production...
transforming (7) node_modules\svelte\internal\index.mjs5:02:58 PM [vite-plugin-svelte] C:/Users/oneezy/Desktop/www/7.Testing/storybook-experimental-vite/src/lib/header/Header.svelte:104:1 Unused CSS selector "li"
102: }
103:
104: li {
^
105: position: relative;
106: height: 100%;
5:02:58 PM [vite-plugin-svelte] C:/Users/oneezy/Desktop/www/7.Testing/storybook-experimental-vite/src/lib/header/Header.svelte:109:1 Unused CSS selector "li.active::before"
107: }
108:
109: li.active::before {
^
110: --size: 6px;
111: content: '';
5:02:58 PM [vite-plugin-svelte] C:/Users/oneezy/Desktop/www/7.Testing/storybook-experimental-vite/src/lib/header/Header.svelte:121:1 Unused CSS selector "nav a"
119: }
120:
121: nav a {
^
122: display: flex;
123: height: 100%;
โ 34 modules transformed.
Client build completed. Wrote 11 chunks and 13 assets
Building server
.svelte-kit/output/client/_app/immutable/assets/svelte-logo-87df40b8.svg 1.85 KiB
.svelte-kit/output/client/_app/immutable/assets/fira-mono-cyrillic-ext-400-normal-3df7909e.woff2 15.40 KiB
.svelte-kit/output/client/_app/immutable/assets/fira-mono-cyrillic-400-normal-c7d433fd.woff2 8.89 KiB
.svelte-kit/output/client/_app/immutable/assets/fira-mono-latin-400-normal-e43b3538.woff2 15.90 KiB
.svelte-kit/output/client/_app/immutable/assets/fira-mono-greek-ext-400-normal-9e2fe623.woff2 7.33 KiB
.svelte-kit/output/client/_app/immutable/assets/fira-mono-greek-400-normal-a8be01ce.woff2 10.27 KiB
.svelte-kit/output/client/_app/immutable/assets/fira-mono-latin-ext-400-normal-6bfabd30.woff2 11.10 KiB
.svelte-kit/output/client/_app/immutable/assets/fira-mono-all-400-normal-1e3b098c.woff 75.55 KiB
.svelte-kit/output/client/_app/immutable/manifest.json 2.91 KiB
.svelte-kit/output/client/_app/immutable/pages/__layout.svelte-9ad479e0.js 3.35 KiB / gzip: 1.43 KiB
.svelte-kit/output/client/_app/immutable/error.svelte-cbe77a4b.js 1.56 KiB / gzip: 0.75 KiB
.svelte-kit/output/client/_app/immutable/pages/about.svelte-7d48ae52.js 2.55 KiB / gzip: 1.16 KiB
.svelte-kit/output/client/_app/immutable/pages/index.svelte-42994e57.js 5.49 KiB / gzip: 2.43 KiB
.svelte-kit/output/client/_app/immutable/start-cc77f170.js 23.32 KiB / gzip: 8.73 KiB
.svelte-kit/output/client/_app/immutable/pages/todos/index.svelte-9c6cc6fe.js 6.86 KiB / gzip: 2.89 KiB
.svelte-kit/output/client/_app/immutable/chunks/index-362766b2.js 0.43 KiB / gzip: 0.30 KiB
.svelte-kit/output/client/_app/immutable/chunks/paths-396f020f.js 0.08 KiB / gzip: 0.09 KiB
.svelte-kit/output/client/_app/immutable/chunks/index-d5170b6e.js 11.76 KiB / gzip: 5.01 KiB
.svelte-kit/output/client/_app/immutable/chunks/singletons-d1fb5791.js 0.05 KiB / gzip: 0.07 KiB
.svelte-kit/output/client/_app/immutable/chunks/env-8755ad23.js 0.08 KiB / gzip: 0.09 KiB
.svelte-kit/output/client/_app/immutable/assets/pages/about.svelte-bf4528fa.css 0.11 KiB / gzip: 0.10 KiB
.svelte-kit/output/client/_app/immutable/assets/pages/__layout.svelte-a2b586dd.css 4.57 KiB / gzip: 1.42 KiB
.svelte-kit/output/client/_app/immutable/assets/pages/todos/index.svelte-a910a02d.css 3.70 KiB / gzip: 1.03 KiB
.svelte-kit/output/client/_app/immutable/assets/pages/index.svelte-8ea20098.css 1.46 KiB / gzip: 0.52 KiB
vite v2.9.13 building SSR bundle for production...
transforming (7) .svelte-kit\runtime\server\index.js5:03:00 PM [vite-plugin-svelte] C:/Users/oneezy/Desktop/www/7.Testing/storybook-experimental-vite/src/lib/header/Header.svelte:104:1 Unused CSS selector "li"
102: }
103:
104: li {
^
105: position: relative;
106: height: 100%;
5:03:00 PM [vite-plugin-svelte] C:/Users/oneezy/Desktop/www/7.Testing/storybook-experimental-vite/src/lib/header/Header.svelte:109:1 Unused CSS selector "li.active::before"
107: }
108:
109: li.active::before {
^
110: --size: 6px;
111: content: '';
5:03:00 PM [vite-plugin-svelte] C:/Users/oneezy/Desktop/www/7.Testing/storybook-experimental-vite/src/lib/header/Header.svelte:121:1 Unused CSS selector "nav a"
119: }
120:
121: nav a {
^
122: display: flex;
123: height: 100%;
โ 35 modules transformed.
.svelte-kit/output/server/manifest.json 2.56 KiB
.svelte-kit/output/server/index.js 72.99 KiB
.svelte-kit/output/server/entries/endpoints/todos/index.ts.js 1.33 KiB
.svelte-kit/output/server/entries/pages/__layout.svelte.js 8.61 KiB
.svelte-kit/output/server/entries/fallbacks/error.svelte.js 0.72 KiB
.svelte-kit/output/server/entries/pages/about.svelte.js 1.54 KiB
.svelte-kit/output/server/entries/pages/index.svelte.js 9.73 KiB
.svelte-kit/output/server/entries/pages/todos/index.svelte.js 9.70 KiB
.svelte-kit/output/server/chunks/paths-396f020f.js 0.16 KiB
.svelte-kit/output/server/chunks/index-4e31cc3f.js 3.86 KiB
.svelte-kit/output/server/chunks/env-1d1664cb.js 0.17 KiB
.svelte-kit/output/server/chunks/hooks-93fa095d.js 0.46 KiB
Prerendering
{
browser: false,
dev: false,
mode: 'production',
prod: true,
server: true
}
{ assets: '', base: '' }
200 /
(node:11076) ExperimentalWarning: buffer.Blob is an experimental feature. This feature could change at any time
{
browser: false,
dev: false,
mode: 'production',
prod: true,
server: true
}
{ assets: '', base: '' }
200 /about
Run npm run preview to preview your production build locally.
> Using @sveltejs/adapter-static
You should set `config.kit.prerender.default` to `true` if no fallback is specified
Wrote site to "build"
โ done
info @storybook/svelte v6.5.9
info
info => Loading presets
info => Ignoring cached manager due to change in manager config
i ๏ฝขwdm๏ฝฃ: wait until bundle finished:
i ๏ฝขwdm๏ฝฃ: Hash: f7c4586746fd689e3c59
Version: webpack 4.46.0
Time: 23413ms
Built at: 06/30/2022 5:04:02 PM
Asset Size Chunks Chunk Names
0.manager.bundle.js 217 KiB 0 [emitted]
1.manager.bundle.js 128 KiB 1 [emitted]
2.manager.bundle.js 891 KiB 2 [emitted] [big]
3.manager.bundle.js 83.9 KiB 3 [emitted]
4.manager.bundle.js 15.8 KiB 4 [emitted]
5.manager.bundle.js 295 KiB 5 [emitted] [big]
6.manager.bundle.js 1.36 KiB 6 [emitted]
index.html 4.01 KiB [emitted]
main.manager.bundle.js 4.95 KiB main [emitted] main
runtime~main.manager.bundle.js 8.95 KiB runtime~main [emitted] runtime~main
vendors~main.manager.bundle.js 4.72 MiB vendors~main [emitted] [big] vendors~main
Entrypoint main [big] = runtime~main.manager.bundle.js vendors~main.manager.bundle.js main.manager.bundle.js
[0] multi ./node_modules/@storybook/core-client/dist/esm/globals/polyfills.js ./node_modules/@storybook/core-client/dist/esm/manager/index.js ./node_modules/@storybook/addon-links/manager.js ./node_modules/@storybook/addon-docs/manager.js ./node_modules/@storybook/addon-controls/manager.js ./node_modules/@storybook/addon-actions/manager.js ./node_modules/@storybook/addon-backgrounds/manager.js ./node_modules/@storybook/addon-viewport/manager.js ./node_modules/@storybook/addon-toolbars/manager.js ./node_modules/@storybook/addon-measure/manager.js ./node_modules/@storybook/addon-outline/manager.js ./node_modules/@storybook/addon-interactions/manager.js 160 bytes {main} [built]
[./node_modules/@storybook/addon-actions/manager.js] ./node_modules/@storybook/addon-actions/manager.js + 5 modules 96.4 KiB {vendors~main} [built]
| ./node_modules/@storybook/addon-actions/manager.js 29 bytes [built]
| ./node_modules/@storybook/addon-actions/dist/esm/manager.js 3.42 KiB [built]
| ./node_modules/@storybook/addon-actions/dist/esm/containers/ActionLogger/index.js 7.4 KiB [built]
| ./node_modules/@storybook/addon-actions/dist/esm/components/ActionLogger/index.js 2.97 KiB [built]
| ./node_modules/@storybook/addon-actions/node_modules/react-inspector/dist/es/react-inspector.js 81.7 KiB [built]
| ./node_modules/@storybook/addon-actions/dist/esm/components/ActionLogger/style.js 793 bytes [built]
[./node_modules/@storybook/addon-backgrounds/manager.js] ./node_modules/@storybook/addon-backgrounds/manager.js + 6 modules 15.2 KiB {vendors~main} [built]
| ./node_modules/@storybook/addon-backgrounds/manager.js 29 bytes [built]
| ./node_modules/@storybook/addon-backgrounds/dist/esm/manager.js 826 bytes [built]
| ./node_modules/@storybook/addon-backgrounds/dist/esm/constants.js 185 bytes [built]
| ./node_modules/@storybook/addon-backgrounds/dist/esm/containers/BackgroundSelector.js 6.55 KiB [built]
| ./node_modules/@storybook/addon-backgrounds/dist/esm/containers/GridSelector.js 3.51 KiB [built]
| ./node_modules/@storybook/addon-backgrounds/dist/esm/components/ColorIcon.js 399 bytes [built]
| ./node_modules/@storybook/addon-backgrounds/dist/esm/helpers/index.js 3.57 KiB [built]
[./node_modules/@storybook/addon-controls/manager.js] ./node_modules/@storybook/addon-controls/manager.js + 3 modules 6 KiB {vendors~main} [built]
| ./node_modules/@storybook/addon-controls/manager.js 29 bytes [built]
| ./node_modules/@storybook/addon-controls/dist/esm/manager.js 1.23 KiB [built]
| ./node_modules/@storybook/addon-controls/dist/esm/constants.js 74 bytes [built]
| ./node_modules/@storybook/addon-controls/dist/esm/ControlsPanel.js 4.57 KiB [built]
[./node_modules/@storybook/addon-docs/manager.js] ./node_modules/@storybook/addon-docs/manager.js + 2 modules 1.02 KiB {vendors~main} [built]
| ./node_modules/@storybook/addon-docs/manager.js 29 bytes [built]
| ./node_modules/@storybook/addon-docs/dist/esm/manager.js 625 bytes [built]
| ./node_modules/@storybook/addon-docs/dist/esm/shared.js 380 bytes [built]
[./node_modules/@storybook/addon-interactions/manager.js] ./node_modules/@storybook/addon-interactions/manager.js + 22 modules 110 KiB {vendors~main} [built]
| ./node_modules/@storybook/addon-interactions/manager.js 29 bytes [built]
| ./node_modules/@storybook/addon-interactions/dist/esm/manager.js 388 bytes [built]
| ./node_modules/@storybook/addon-interactions/dist/esm/constants.js 100 bytes [built]
| ./node_modules/@storybook/addon-interactions/dist/esm/Panel.js 11.3 KiB [built]
| ./node_modules/@storybook/addon-interactions/dist/esm/components/StatusIcon/StatusIcon.js 1.85 KiB [built]
| ./node_modules/@storybook/addon-interactions/dist/esm/components/Subnav/Subnav.js 5.2 KiB [built]
| ./node_modules/@storybook/addon-interactions/dist/esm/components/Interaction/Interaction.js 5.7 KiB [built]
| ./node_modules/@storybook/instrumenter/dist/esm/types.js 221 bytes [built]
| ./node_modules/@storybook/instrumenter/dist/esm/instrumenter.js 32.9 KiB [built]
| ./node_modules/@storybook/addon-interactions/dist/esm/theme.js 215 bytes [built]
| ./node_modules/@storybook/addon-interactions/dist/esm/components/StatusBadge/StatusBadge.js 1.79 KiB [built]
| ./node_modules/@storybook/addon-interactions/dist/esm/components/MethodCall.js 19.2 KiB [built]
| ./node_modules/@storybook/addon-interactions/dist/esm/components/MatcherResult.js 7.49 KiB [built]
| ./node_modules/@devtools-ds/object-inspector/dist/esm/index.js 103 bytes [built]
| ./node_modules/@devtools-ds/object-inspector/dist/esm/ObjectInspector.js 1.37 KiB [built]
| + 8 hidden modules
[./node_modules/@storybook/addon-links/manager.js] ./node_modules/@storybook/addon-links/manager.js + 2 modules 662 bytes {vendors~main} [built]
| ./node_modules/@storybook/addon-links/manager.js 29 bytes [built]
| ./node_modules/@storybook/addon-links/dist/esm/manager.js 398 bytes [built]
| ./node_modules/@storybook/addon-links/dist/esm/constants.js 225 bytes [built]
[./node_modules/@storybook/addon-measure/manager.js] ./node_modules/@storybook/addon-measure/manager.js + 3 modules 3.99 KiB {vendors~main} [built]
| ./node_modules/@storybook/addon-measure/manager.js 29 bytes [built]
| ./node_modules/@storybook/addon-measure/dist/esm/manager.js 484 bytes [built]
| ./node_modules/@storybook/addon-measure/dist/esm/constants.js 290 bytes [built]
| ./node_modules/@storybook/addon-measure/dist/esm/Tool.js 3.12 KiB [built]
[./node_modules/@storybook/addon-outline/manager.js] ./node_modules/@storybook/addon-outline/manager.js + 3 modules 4.15 KiB {vendors~main} [built]
| ./node_modules/@storybook/addon-outline/manager.js 29 bytes [built]
| ./node_modules/@storybook/addon-outline/dist/esm/manager.js 626 bytes [built]
| ./node_modules/@storybook/addon-outline/dist/esm/constants.js 76 bytes [built]
| ./node_modules/@storybook/addon-outline/dist/esm/OutlineSelector.js 3.35 KiB [built]
[./node_modules/@storybook/addon-toolbars/manager.js] ./node_modules/@storybook/addon-toolbars/manager.js + 11 modules 19 KiB {vendors~main} [built]
| ./node_modules/@storybook/addon-toolbars/manager.js 29 bytes [built]
| ./node_modules/@storybook/addon-toolbars/dist/esm/manager.js 467 bytes [built]
| ./node_modules/@storybook/addon-toolbars/dist/esm/constants.js 76 bytes [built]
| ./node_modules/@storybook/addon-toolbars/dist/esm/components/ToolbarManager.js 1.44 KiB [built]
| ./node_modules/@storybook/addon-toolbars/dist/esm/components/ToolbarMenuList.js 4.99 KiB [built]
| ./node_modules/@storybook/addon-toolbars/dist/esm/utils/normalize-toolbar-arg-type.js 1.05 KiB [built]
| ./node_modules/@storybook/addon-toolbars/dist/esm/components/ToolbarMenuButton.js 625 bytes [built]
| ./node_modules/@storybook/addon-toolbars/dist/esm/hoc/withKeyboardCycle.js 5.09 KiB [built]
| ./node_modules/@storybook/addon-toolbars/dist/esm/utils/get-selected.js 1000 bytes [built]
| ./node_modules/@storybook/addon-toolbars/dist/esm/components/ToolbarMenuListItem.js 979 bytes [built]
| ./node_modules/@storybook/addon-toolbars/dist/esm/utils/create-cycle-value-array.js 573 bytes [built]
| ./node_modules/@storybook/addon-toolbars/dist/esm/utils/register-shortcuts.js 2.69 KiB [built]
[./node_modules/@storybook/addon-viewport/manager.js] ./node_modules/@storybook/addon-viewport/manager.js + 5 modules 18.8 KiB {vendors~main} [built]
| ./node_modules/@storybook/addon-viewport/manager.js 29 bytes [built]
| ./node_modules/@storybook/addon-viewport/dist/esm/manager.js 514 bytes [built]
| ./node_modules/@storybook/addon-viewport/dist/esm/constants.js 316 bytes [built]
| ./node_modules/@storybook/addon-viewport/dist/esm/Tool.js 11 KiB [built]
| ./node_modules/@storybook/addon-viewport/dist/esm/shortcuts.js 3.81 KiB [built]
| ./node_modules/@storybook/addon-viewport/dist/esm/defaults.js 2.98 KiB [built]
[./node_modules/@storybook/core-client/dist/esm/globals/polyfills.js] 97 bytes {vendors~main} [built]
[./node_modules/@storybook/core-client/dist/esm/manager/index.js] ./node_modules/@storybook/core-client/dist/esm/manager/index.js + 4 modules 22.9 KiB {vendors~main} [built]
| ./node_modules/@storybook/core-client/dist/esm/manager/index.js 335 bytes [built]
| ./node_modules/@storybook/core-client/dist/esm/manager/provider.js 5.17 KiB [built]
| ./node_modules/@storybook/core-client/dist/esm/manager/conditional-polyfills.js 762 bytes [built]
| ./node_modules/@storybook/channel-postmessage/dist/esm/index.js 13.2 KiB [built]
| ./node_modules/@storybook/channel-websocket/dist/esm/index.js 3.26 KiB [built]
[./node_modules/@storybook/ui/dist/esm/index.js] 498 KiB {vendors~main} [built]
[./node_modules/airbnb-js-shims/index.js] 40 bytes {vendors~main} [built]
+ 924 hidden modules
Child HtmlWebpackCompiler:
Asset Size Chunks Chunk Names
__child-HtmlWebpackPlugin_0 6.34 KiB HtmlWebpackPlugin_0 HtmlWebpackPlugin_0
Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
[./node_modules/html-webpack-plugin/lib/loader.js!./node_modules/@storybook/core-common/templates/index.ejs] 2.06 KiB {HtmlWebpackPlugin_0} [built]
i ๏ฝขwdm๏ฝฃ: Compiled successfully.
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Storybook 6.5.9 for Svelte started โ
โ 25 s for manager and 5.27 s for preview โ
โ โ
โ Local: http://localhost:6006/ โ
โ On your network: http://192.168.0.9:6006/ โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Failed to resolve import "@mdx-js/react" from "src\stories\Introduction.stories.mdx". Does the file exist?
5:04:20 PM [vite-plugin-svelte] C:/Users/oneezy/Desktop/www/7.Testing/storybook-experimental-vite/src/lib/header/Header.svelte:104:1 Unused CSS selector "li"
5:04:20 PM [vite-plugin-svelte] C:/Users/oneezy/Desktop/www/7.Testing/storybook-experimental-vite/src/lib/header/Header.svelte:109:1 Unused CSS selector "li.active::before"
5:04:20 PM [vite-plugin-svelte] C:/Users/oneezy/Desktop/www/7.Testing/storybook-experimental-vite/src/lib/header/Header.svelte:121:1 Unused CSS selector "nav a"
5:04:38 PM [vite] โจ new dependencies optimized: @storybook/svelte/dist/esm/client/preview/config, @storybook/svelte/dist/esm/client/docs/config, @storybook/addon-links/preview.js, @storybook/addon-docs/preview.js, @storybook/addon-actions/preview.js, ...and 4 more
5:04:38 PM [vite] โจ optimized dependencies changed. reloading
Failed to resolve import "@mdx-js/react" from "src\stories\Introduction.stories.mdx". Does the file exist?
5:04:40 PM [vite-plugin-svelte] C:/Users/oneezy/Desktop/www/7.Testing/storybook-experimental-vite/src/lib/header/Header.svelte:104:1 Unused CSS selector "li"
5:04:40 PM [vite-plugin-svelte] C:/Users/oneezy/Desktop/www/7.Testing/storybook-experimental-vite/src/lib/header/Header.svelte:109:1 Unused CSS selector "li.active::before"
5:04:40 PM [vite-plugin-svelte] C:/Users/oneezy/Desktop/www/7.Testing/storybook-experimental-vite/src/lib/header/Header.svelte:121:1 Unused CSS selector "nav a"
5:04:41 PM [vite] Internal server error: Failed to resolve import "@mdx-js/react" from "src\stories\Introduction.stories.mdx". Does the file exist?
Plugin: vite:import-analysis
File: C:/Users/oneezy/Desktop/www/7.Testing/storybook-experimental-vite/src/stories/Introduction.stories.mdx
5 | /* @jsx mdx */
6 | import React from 'react';
7 | import { mdx } from '@mdx-js/react';
| ^
8 | /* @jsxRuntime classic */
9 |
at formatError (C:\Users\oneezy\Desktop\www\7.Testing\storybook-experimental-vite\node_modules\vite\dist\node\chunks\dep-3397b401.js:38580:46)
at TransformContext.error (C:\Users\oneezy\Desktop\www\7.Testing\storybook-experimental-vite\node_modules\vite\dist\node\chunks\dep-3397b401.js:38576:19)
at normalizeUrl (C:\Users\oneezy\Desktop\www\7.Testing\storybook-experimental-vite\node_modules\vite\dist\node\chunks\dep-3397b401.js:56688:26)
at async TransformContext.transform (C:\Users\oneezy\Desktop\www\7.Testing\storybook-experimental-vite\node_modules\vite\dist\node\chunks\dep-3397b401.js:56837:57)
at async Object.transform (C:\Users\oneezy\Desktop\www\7.Testing\storybook-experimental-vite\node_modules\vite\dist\node\chunks\dep-3397b401.js:38817:30)
at async doTransform (C:\Users\oneezy\Desktop\www\7.Testing\storybook-experimental-vite\node_modules\vite\dist\node\chunks\dep-3397b401.js:55749:29)
5:05:11 PM [vite] Internal server error: Failed to resolve import "@mdx-js/react" from "src\stories\Introduction.stories.mdx". Does the file exist?
Plugin: vite:import-analysis
File: C:/Users/oneezy/Desktop/www/7.Testing/storybook-experimental-vite/src/stories/Introduction.stories.mdx
5 | /* @jsx mdx */
6 | import React from 'react';
7 | import { mdx } from '@mdx-js/react';
| ^
8 | /* @jsxRuntime classic */
9 |
at formatError (C:\Users\oneezy\Desktop\www\7.Testing\storybook-experimental-vite\node_modules\vite\dist\node\chunks\dep-3397b401.js:38580:46)
at TransformContext.error (C:\Users\oneezy\Desktop\www\7.Testing\storybook-experimental-vite\node_modules\vite\dist\node\chunks\dep-3397b401.js:38576:19)
at normalizeUrl (C:\Users\oneezy\Desktop\www\7.Testing\storybook-experimental-vite\node_modules\vite\dist\node\chunks\dep-3397b401.js:56688:26)
at async TransformContext.transform (C:\Users\oneezy\Desktop\www\7.Testing\storybook-experimental-vite\node_modules\vite\dist\node\chunks\dep-3397b401.js:56837:57)
at async Object.transform (C:\Users\oneezy\Desktop\www\7.Testing\storybook-experimental-vite\node_modules\vite\dist\node\chunks\dep-3397b401.js:38817:30)
at async doTransform (C:\Users\oneezy\Desktop\www\7.Testing\storybook-experimental-vite\node_modules\vite\dist\node\chunks\dep-3397b401.js:55749:29) (x2)
Building without package-lock.json (ie. with Yarn) fails
Hi, thanks for putting this repo together, having all these working together is really nice!
What I observed was, I initially tried installing with yarn
rather than npm
. This of course bypasses the package-lock.json
which is checked in to the repo. It turns out this didn't work.
I then tried npm i
exactly as per the instructions in the readme, and that worked fine.
I then tried deleting package-lock.json
and node_modules
and then doing npm i
once again, and saw the same errors as with yarn
.
I guess one of the dependencies has been updated with a change that breaks the $app/env
mocking? I have no idea how to narrow it down though.
One other thing I tried was converting the package-lock.json
to a yarn.lock
:
yarn import
yarn add @sveltejs/kit # to have `svelte-kit sync` command
yarn
git checkout package.json. # to reset svelte-kit to the version in `yarn.lock`
yarn
It gave the same errors.
Add sveltekit plugin in `.storybook/main.cjs`
An important area where the plugin is supposed to help!
Related: sveltejs/kit#5184 (comment)
Ability to get rid of separate svelteOptions
config?
Also see whether adding the plugin removes the need to separately specify items like the preprocessor:
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.