Skip to content

fix: update file extensions for generated vite configs to use .json instead of .js#663

Merged
tobiasdiez merged 1 commit intonuxt-modules:mainfrom
tobiasdiez:fix-log-write
Jun 27, 2024
Merged

fix: update file extensions for generated vite configs to use .json instead of .js#663
tobiasdiez merged 1 commit intonuxt-modules:mainfrom
tobiasdiez:fix-log-write

Conversation

@tobiasdiez
Copy link
Collaborator

Fixes the issue mentioned in #658 (comment)

@netlify
Copy link

netlify bot commented Jun 27, 2024

👷 Deploy request for nuxt-storybook pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit dc4d6fc

@tobiasdiez tobiasdiez merged commit 8492b38 into nuxt-modules:main Jun 27, 2024
@tobiasdiez tobiasdiez deleted the fix-log-write branch June 27, 2024 18:57
@dentropy
Copy link

This issue does not seem to be reseolved,

I ran the following commands and got an the same error,

pnpm dlx nuxi@latest init Try005
cd Try005
npx nuxi@latest module add storybook
npx storybook-nuxt init
pnpm run storybook

I then get the following logs,

> nuxt-app@ storybook /Users/paulmullins/Downloads/PinaColata/Try005
> storybook dev --port 6006

@storybook/cli v8.0.8

(node:19644) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
WARN The following packages are incompatible with Storybook 8.0.8 as they depend on different major versions of Storybook packages:
WARN - @nuxtjs/storybook@8.1.5
WARN  Repo: https://storybook.nuxtjs.org
WARN 
WARN 
WARN Please consider updating your packages or contacting the maintainers for compatibility details.
WARN For more on Storybook 8 compatibility, see the linked GitHub issue:
WARN https://github.com/storybookjs/storybook/issues/26031
The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
info => Starting manager..
info => Starting preview..
(node:19644) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
ℹ Building client...                                                                                                                                      2:34:47 PM
ℹ vite v5.3.5 building for development...                                                                                                                 2:34:47 PM
ℹ ✓ 132 modules transformed.                                                                                                                              2:34:48 PM
ℹ .nuxt/dist/client/manifest.json                   2.46 kB │ gzip:  0.40 kB                                                                              2:34:49 PM
ℹ .nuxt/dist/client/_nuxt/error-dev.DHo5_0bm.css    2.16 kB │ gzip:  0.80 kB                                                                              2:34:49 PM
ℹ .nuxt/dist/client/_nuxt/error-404.ro6_r8Hu.css    3.55 kB │ gzip:  1.10 kB                                                                              2:34:49 PM
ℹ .nuxt/dist/client/_nuxt/entry.qbzXrYjb.css       12.66 kB │ gzip:  2.50 kB                                                                              2:34:49 PM
ℹ .nuxt/dist/client/_nuxt/CNyVo4dG.js               3.62 kB │ gzip:  1.70 kB │ map:     5.95 kB                                                           2:34:49 PM
ℹ .nuxt/dist/client/_nuxt/BuYtj6jZ.js               7.98 kB │ gzip:  3.51 kB │ map:    25.53 kB                                                           2:34:49 PM
ℹ .nuxt/dist/client/_nuxt/DsSzlRSw.js             294.58 kB │ gzip: 92.60 kB │ map: 1,211.52 kB                                                           2:34:49 PM
ℹ ✓ built in 1.91s                                                                                                                                        2:34:49 PM
✔ Client built in 1924ms                                                                                                                                  2:34:49 PM
ℹ Building server...                                                                                                                                      2:34:49 PM
ℹ vite v5.3.5 building SSR bundle for development...                                                                                                      2:34:49 PM
ℹ ✓ 1 modules transformed.                                                                                                                                2:34:49 PM
ℹ .nuxt/dist/server/styles.mjs  0.07 kB                                                                                                                   2:34:49 PM
ℹ .nuxt/dist/server/server.mjs  0.10 kB │ map: 0.36 kB                                                                                                    2:34:49 PM
ℹ ✓ built in 16ms                                                                                                                                         2:34:49 PM
✔ Server built in 24ms                                                                                                                                    2:34:49 PM
✔ Generated public .output/public                                                                                                                   nitro 2:34:49 PM
ℹ Building Nuxt Nitro server (preset: node-server)                                                                                                  nitro 2:34:49 PM
✔ Nuxt Nitro server built                                                                                                                           nitro 2:34:51 PM
  ├─ .output/server/chunks/_/error-500.mjs (4.82 kB) (2.04 kB gzip)
  ├─ .output/server/chunks/_/error-500.mjs.map (330 B) (255 B gzip)
  ├─ .output/server/chunks/build/client.manifest.mjs (3.24 kB) (534 B gzip)
  ├─ .output/server/chunks/build/client.manifest.mjs.map (1.63 kB) (366 B gzip)
  ├─ .output/server/chunks/routes/renderer.mjs (12.2 kB) (4.01 kB gzip)
  ├─ .output/server/chunks/routes/renderer.mjs.map (787 B) (348 B gzip)
  ├─ .output/server/chunks/runtime.mjs (165 kB) (40.2 kB gzip)
  ├─ .output/server/chunks/runtime.mjs.map (4.6 kB) (976 B gzip)
  ├─ .output/server/chunks/virtual/_virtual_spa-template.mjs (94 B) (100 B gzip)
  ├─ .output/server/chunks/virtual/_virtual_spa-template.mjs.map (112 B) (111 B gzip)
  ├─ .output/server/index.mjs (291 B) (192 B gzip)
  └─ .output/server/package.json (595 B) (293 B gzip)
Σ Total size: 1.57 MB (377 kB gzip)
✔ You can preview this build using node .output/server/index.mjs                                                                                    nitro 2:34:51 PM
╭──────────────────────────────────────────────────────────────────────────────────────────╮                                                               2:34:51 PM
│                                                                                          │
│   Storybook 8.0.8 for @storybook-vue/nuxt started                                        │
│   271 ms for manager and 12 s for preview                                                │
│                                                                                          │
│    Local:            http://localhost:6006/                                              │
│    On your network:  http://10.0.0.39:6006/                                              │
│                                                                                          │
│   A new version (8.2.5) is available!                                                    │
│                                                                                          │
│   Upgrade now: npx storybook@latest upgrade                                              │
│                                                                                          │
│   Read full changelog: https://github.com/storybookjs/storybook/blob/main/CHANGELOG.md   │
│                                                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
✘ [ERROR] The entry point "vue" cannot be marked as external

/Users/paulmullins/Downloads/PinaColata/Try005/node_modules/.pnpm/@storybook+cli@8.0.8_@babel+preset-env@7.25.0_@babel+core@7.24.9__react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@storybook/cli/bin/index.js:23
  throw error;
  ^

Error: Build failed with 1 error:
error: The entry point "vue" cannot be marked as external
    at failureErrorWithLog (/Users/paulmullins/Downloads/PinaColata/Try005/node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:1472:15)
    at /Users/paulmullins/Downloads/PinaColata/Try005/node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:945:25
    at /Users/paulmullins/Downloads/PinaColata/Try005/node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:1353:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errors: [Getter/Setter],
  warnings: [Getter/Setter]
}

Node.js v21.1.0
 ELIFECYCLE  Command failed with exit code 7.
 ```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants