Open jojomatik opened 1 year ago
@jojomatik I will fix that, thank you for reporting it
@jojomatik can test again to close this issue ?
I still have this error
pnpm storybook
─╯
> @ storybook C:\Users\benes\Scripts\nuxt3-frontend-webapp
> storybook dev -p 6006
@storybook/cli v7.1.1
WARN Failed to load preset: "@storybook-vue\\nuxt\\preset"
ERR! C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\github.com+storybook-vue+nuxt@a647f44614e67f94da6877d381a9435abcb8ed48_@types+node@18.17.1_@v_zlfnxkqenwxpupllcibsyi4zou\node_modules\@storybook-vue\nuxt\src\preset.ts:2
ERR! import { join } from 'path';
ERR! ^^^^^^
ERR!
ERR! SyntaxError: Cannot use import statement outside a module
ERR! at Object.compileFunction (node:vm:360:18)
ERR! at wrapSafe (node:internal/modules/cjs/loader:1088:15)
ERR! at Module._compile (node:internal/modules/cjs/loader:1123:27)
ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
ERR! at Object.newLoader [as .ts] (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\esbuild-register@3.4.2_esbuild@0.18.17\node_modules\esbuild-register\dist\node.js:2262:9)
ERR! at Module.load (node:internal/modules/cjs/loader:1037:32)
ERR! at Module._load (node:internal/modules/cjs/loader:878:12)
ERR! at Module.require (node:internal/modules/cjs/loader:1061:19)
ERR! at require (node:internal/modules/cjs/helpers:103:18)
ERR! at Object.<anonymous> (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\github.com+storybook-vue+nuxt@a647f44614e67f94da6877d381a9435abcb8ed48_@types+node@18.17.1_@v_zlfnxkqenwxpupllcibsyi4zou\node_modules\@storybook-vue\nuxt\preset.js:1:18)
ERR! C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\github.com+storybook-vue+nuxt@a647f44614e67f94da6877d381a9435abcb8ed48_@types+node@18.17.1_@v_zlfnxkqenwxpupllcibsyi4zou\node_modules\@storybook-vue\nuxt\src\preset.ts:2
ERR! import { join } from 'path';
ERR! ^^^^^^
ERR!
ERR! SyntaxError: Cannot use import statement outside a module
ERR! at Object.compileFunction (node:vm:360:18)
ERR! at wrapSafe (node:internal/modules/cjs/loader:1088:15)
ERR! at Module._compile (node:internal/modules/cjs/loader:1123:27)
ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
ERR! at Object.newLoader [as .ts] (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\esbuild-register@3.4.2_esbuild@0.18.17\node_modules\esbuild-register\dist\node.js:2262:9)
ERR! at Module.load (node:internal/modules/cjs/loader:1037:32)
ERR! at Module._load (node:internal/modules/cjs/loader:878:12)
ERR! at Module.require (node:internal/modules/cjs/loader:1061:19)
ERR! at require (node:internal/modules/cjs/helpers:103:18)
ERR! at Object.<anonymous> (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\github.com+storybook-vue+nuxt@a647f44614e67f94da6877d381a9435abcb8ed48_@types+node@18.17.1_@v_zlfnxkqenwxpupllcibsyi4zou\node_modules\@storybook-vue\nuxt\preset.js:1:18)
WARN Could not resolve addon "storybook-addon-nuxt", skipping. Is it installed?
ERR! Error: no builder configured!
ERR! at getPreviewBuilder (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+core-server@7.1.1\node_modules\@storybook\core-server\dist\index.js:57:1918)
ERR! at buildDevStandalone (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+core-server@7.1.1\node_modules\@storybook\core-server\dist\index.js:128:1888)
ERR! at async withTelemetry (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+core-server@7.1.1\node_modules\@storybook\core-server\dist\index.js:113:3725)
ERR! at async dev (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+cli@7.1.1\node_modules\@storybook\cli\dist\generate.js:457:401)
ERR! at async Command.<anonymous> (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+cli@7.1.1\node_modules\@storybook\cli\dist\generate.js:459:225)
ERR! Error: no builder configured!
ERR! at getPreviewBuilder (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+core-server@7.1.1\node_modules\@storybook\core-server\dist\index.js:57:1918)
ERR! at buildDevStandalone (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+core-server@7.1.1\node_modules\@storybook\core-server\dist\index.js:128:1888)
ERR! at async withTelemetry (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+core-server@7.1.1\node_modules\@storybook\core-server\dist\index.js:113:3725)
ERR! at async dev (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+cli@7.1.1\node_modules\@storybook\cli\dist\generate.js:457:401)
ERR! at async Command.<anonymous> (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+cli@7.1.1\node_modules\@storybook\cli\dist\generate.js:459:225)
WARN Broken build, fix the error above.
WARN You may need to refresh the browser.
WARN Could not resolve addon "storybook-addon-nuxt", skipping. Is it installed?
ELIFECYCLE Command failed with exit code 1.
╭─ ~\Scripts\nuxt3-frontend-webapp main ≡ ?1 ~18 -1 18.12.1 11.065s 14:17:48 ─╮
╰─ pnpm storybook ─╯
> @ storybook C:\Users\benes\Scripts\nuxt3-frontend-webapp
> storybook dev -p 6006
@storybook/cli v7.1.1
WARN Failed to load preset: "@storybook-vue\\nuxt\\preset"
ERR! Error: Cannot find module './dist/preset'
ERR! Require stack:
ERR! - C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\github.com+storybook-vue+nuxt@a647f44614e67f94da6877d381a9435abcb8ed48_@types+node@18.17.1_@v_zlfnxkqenwxpupllcibsyi4zou\node_modules\@storybook-vue\nuxt\preset.js
ERR! - C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+core-common@7.1.1\node_modules\@storybook\core-common\dist\index.js
ERR! - C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+telemetry@7.1.1\node_modules\@storybook\telemetry\dist\index.js
ERR! - C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+cli@7.1.1\node_modules\@storybook\cli\dist\generate.js
ERR! - C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+cli@7.1.1\node_modules\@storybook\cli\bin\index.js
ERR! - C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\storybook@7.1.1\node_modules\storybook\index.js
ERR! at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
ERR! at Module._resolveFilename (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\esbuild-register@3.4.2_esbuild@0.18.17\node_modules\esbuild-register\dist\node.js:4768:36)
ERR! at Module._load (node:internal/modules/cjs/loader:841:27)
ERR! at Module.require (node:internal/modules/cjs/loader:1061:19)
ERR! at require (node:internal/modules/cjs/helpers:103:18)
ERR! at Object.<anonymous> (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\github.com+storybook-vue+nuxt@a647f44614e67f94da6877d381a9435abcb8ed48_@types+node@18.17.1_@v_zlfnxkqenwxpupllcibsyi4zou\node_modules\@storybook-vue\nuxt\preset.js:1:18)
ERR! at Module._compile (node:internal/modules/cjs/loader:1159:14)
ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
ERR! at Object.newLoader (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\esbuild-register@3.4.2_esbuild@0.18.17\node_modules\esbuild-register\dist\node.js:2262:9)
ERR! at extensions..js (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\esbuild-register@3.4.2_esbuild@0.18.17\node_modules\esbuild-register\dist\node.js:4807:24)
ERR! Error: Cannot find module './dist/preset'
ERR! Require stack:
ERR! - C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\github.com+storybook-vue+nuxt@a647f44614e67f94da6877d381a9435abcb8ed48_@types+node@18.17.1_@v_zlfnxkqenwxpupllcibsyi4zou\node_modules\@storybook-vue\nuxt\preset.js
ERR! - C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+core-common@7.1.1\node_modules\@storybook\core-common\dist\index.js
ERR! - C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+telemetry@7.1.1\node_modules\@storybook\telemetry\dist\index.js
ERR! - C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+cli@7.1.1\node_modules\@storybook\cli\dist\generate.js
ERR! - C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+cli@7.1.1\node_modules\@storybook\cli\bin\index.js
ERR! - C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\storybook@7.1.1\node_modules\storybook\index.js
ERR! at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
ERR! at Module._resolveFilename (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\esbuild-register@3.4.2_esbuild@0.18.17\node_modules\esbuild-register\dist\node.js:4768:36)
ERR! at Module._load (node:internal/modules/cjs/loader:841:27)
ERR! at Module.require (node:internal/modules/cjs/loader:1061:19)
ERR! at require (node:internal/modules/cjs/helpers:103:18)
ERR! at Object.<anonymous> (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\github.com+storybook-vue+nuxt@a647f44614e67f94da6877d381a9435abcb8ed48_@types+node@18.17.1_@v_zlfnxkqenwxpupllcibsyi4zou\node_modules\@storybook-vue\nuxt\preset.js:1:18)
ERR! at Module._compile (node:internal/modules/cjs/loader:1159:14)
ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
ERR! at Object.newLoader (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\esbuild-register@3.4.2_esbuild@0.18.17\node_modules\esbuild-register\dist\node.js:2262:9)
ERR! at extensions..js (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\esbuild-register@3.4.2_esbuild@0.18.17\node_modules\esbuild-register\dist\node.js:4807:24) {
ERR! code: 'MODULE_NOT_FOUND',
ERR! requireStack: [
ERR! 'C:\\Users\\benes\\Scripts\\nuxt3-frontend-webapp\\node_modules\\.pnpm\\github.com+storybook-vue+nuxt@a647f44614e67f94da6877d381a9435abcb8ed48_@types+node@18.17.1_@v_zlfnxkqenwxpupllcibsyi4zou\\node_modules\\@storybook-vue\\nuxt\\preset.js',
ERR! 'C:\\Users\\benes\\Scripts\\nuxt3-frontend-webapp\\node_modules\\.pnpm\\@storybook+core-common@7.1.1\\node_modules\\@storybook\\core-common\\dist\\index.js',
ERR! 'C:\\Users\\benes\\Scripts\\nuxt3-frontend-webapp\\node_modules\\.pnpm\\@storybook+telemetry@7.1.1\\node_modules\\@storybook\\telemetry\\dist\\index.js',
ERR! 'C:\\Users\\benes\\Scripts\\nuxt3-frontend-webapp\\node_modules\\.pnpm\\@storybook+cli@7.1.1\\node_modules\\@storybook\\cli\\dist\\generate.js',
ERR! 'C:\\Users\\benes\\Scripts\\nuxt3-frontend-webapp\\node_modules\\.pnpm\\@storybook+cli@7.1.1\\node_modules\\@storybook\\cli\\bin\\index.js',
ERR! 'C:\\Users\\benes\\Scripts\\nuxt3-frontend-webapp\\node_modules\\.pnpm\\storybook@7.1.1\\node_modules\\storybook\\index.js'
ERR! ]
ERR! }
ERR! Error: no builder configured!
ERR! at getPreviewBuilder (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+core-server@7.1.1\node_modules\@storybook\core-server\dist\index.js:57:1918)
ERR! at buildDevStandalone (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+core-server@7.1.1\node_modules\@storybook\core-server\dist\index.js:128:1888)
ERR! at async withTelemetry (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+core-server@7.1.1\node_modules\@storybook\core-server\dist\index.js:113:3725)
ERR! at async dev (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+cli@7.1.1\node_modules\@storybook\cli\dist\generate.js:457:401)
ERR! at async Command.<anonymous> (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+cli@7.1.1\node_modules\@storybook\cli\dist\generate.js:459:225)
ERR! Error: no builder configured!
ERR! at getPreviewBuilder (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+core-server@7.1.1\node_modules\@storybook\core-server\dist\index.js:57:1918)
ERR! at buildDevStandalone (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+core-server@7.1.1\node_modules\@storybook\core-server\dist\index.js:128:1888)
ERR! at async withTelemetry (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+core-server@7.1.1\node_modules\@storybook\core-server\dist\index.js:113:3725)
ERR! at async dev (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+cli@7.1.1\node_modules\@storybook\cli\dist\generate.js:457:401)
ERR! at async Command.<anonymous> (C:\Users\benes\Scripts\nuxt3-frontend-webapp\node_modules\.pnpm\@storybook+cli@7.1.1\node_modules\@storybook\cli\dist\generate.js:459:225)
WARN Broken build, fix the error above.
WARN You may need to refresh the browser.
ELIFECYCLE Command failed with exit code 1.
How did you install the package? I just run pnpm i storybook-vue/nuxt
. Is this right?
I had to upgrade to a newer nuxt version
├─┬ @storybook-vue/nuxt 0.1.0-alpha.3
│ └── ✕ unmet peer nuxt@^3.6.5: found 3.6.1
now npx storybook-nuxt init
will try to install storybook-nuxt@7.2.1
but runs into an other error. npm ERR! code EUNSUPPORTEDPROTOCOL
mentined here
Hi @chakAs3, sorry for the late reply. I was very involved in different projects over the last few months and didn't have a lot of time for my open source projects.
I've now tried to switch to version 0.0.8 but now I'm having a different error. See https://github.com/jojomatik/nuxt-3-base/actions/runs/6041755557/job/16395397674
Locally I'm actually getting a different error: ERR! Error: no builder configured!
Not sure why that is though...
Could you check if you can reproduce that using the PR mentioned in the original issue description?
Hi @chakAs3, sorry for the late reply. I was very involved in different projects over the last few months and didn't have a lot of time for my open source projects.
I've now tried to switch to version 0.0.8 but now I'm having a different error. See https://github.com/jojomatik/nuxt-3-base/actions/runs/6041755557/job/16395397674
Locally I'm actually getting a different error:
ERR! Error: no builder configured!
Not sure why that is though...Could you check if you can reproduce that using the PR mentioned in the original issue description?
New Issue opend: https://github.com/storybook-vue/storybook-nuxt/issues/61#issue-1894804194
please check https://storybook.nuxtjs.org/
After switching to this package in my project, I receive the following error.
See also this PR https://github.com/jojomatik/nuxt-3-base/pull/273 and workflow https://github.com/jojomatik/nuxt-3-base/actions/runs/5685029360/job/15409035368