Open eldadYikne opened 1 year ago
I had this same issue and resolved it by disabling nuxt devtools for the specific project
I also have the error without having nuxt devtools. The proplem cause with @histoire/plugin-nuxt greater than version 0.14.2 which is 0.15.0.
I'm getting this exact error as well - both with and without Nuxt devtools. The histoire page shows up, but no stories are collected.
Getting the same error, after installing font-awesome following this Guidelines: https://fontawesome.com/docs/web/use-with/vue/use-with
I have the same problem, is there a solution?
Same here
Same here. Disabling nuxt devtools was the solution for me, but now I'm getting the following error
[nuxt] error caught during app initialization ReferenceError: document is not defined
at normalizeContainer (C:\ways-agency\personal\nuxt-histoire\node_modules\.pnpm\@vue+runtime-dom@3.3.4\node_modules\@vue\runtime-dom\dist\runtime-dom.cjs.js:1440:17)
at Object.app.mount (C:\ways-agency\personal\nuxt-histoire\node_modules\.pnpm\@vue+runtime-dom@3.3.4\node_modules\@vue\runtime-dom\dist\runtime-dom.cjs.js:1371:23)
at initApp (C:\ways-agency\personal\nuxt-histoire\node_modules\.pnpm\nuxt@3.6.1_@types+node@18.0.0\node_modules\nuxt\dist\app\entry.js:63:14)
Only solution at the moment is to switch to Linux.
@Akryum I found the error to be in "resolved-support-plugins-collect.js" since windows needs a file:// prefix to work.
import { pathToFileURL } from 'node:url';
const plugins = ctx.supportPlugins.map(p => `'${p.id}': () => import("${pathToFileURL(require.resolve(`${p.moduleName}/collect${process.env.HISTOIRE_DEV && PLUGINS_HAVE_DEV.includes(p.moduleName) ? '-dev' : ''}`, {
paths: [ctx.root, import.meta.url],
}))}")`);
fixed the issue (at least for vite (the following line passes fine in vite):
[imports, exports] = parse$e(source);
[
{
n: 'file:///C:/Work/nuxt3minimalreproduction/Nuxt3MinimalReproduction/node_modules/histoire/dist/node/builtin-plugins/vanilla-support/collect.js',
s: 67,
e: 209,
ss: 60,
se: 210,
d: 66,
a: -1
},
{
n: 'file:///C:/Work/nuxt3minimalreproduction/Nuxt3MinimalReproduction/node_modules/@histoire/plugin-vue/dist/bundled/client/server.js',
s: 235,
e: 366,
ss: 228,
se: 367,
d: 234,
a: -1
}
] [
{
s: 13,
e: 34,
ls: 13,
le: 34,
n: 'collectSupportPlugins',
ln: 'collectSupportPlugins'
}
] imports, exports
but afterwards it fails at some point which I'm unable to find the source of:
Error: Failed to resolve import "file:///C:/Work/nuxt3minimalreproduction/Nuxt3MinimalReproduction/node_modules/histoire/dist/node/builtin-plugins/vanilla-support/collect.js" from "..\..\..\__resolved__virtual:$histoire-support-plugins-collect". Does the file exist?
MiniRepo (without the mentioned changes as I edited node_modules): https://github.com/noel-schenk/nuxt-minimal-reproduction-for-histoire
@Akryum Since there is no solution for this problem yet, we're basically forced to stay with version 0.14.x
Can we therefore get a fix for "vite mergeConfig doesn't accept callback params" for version 0.14.x? You already merged it for v0.16.2, but this is not usable on windows due to this bug.
I already created a PR with the same commit, not sure if that is the correct way to go: https://github.com/histoire-dev/histoire/pull/568
Would really appreciate it, if we can get this fix for the older version.
Not sure if this is related, but with v0.17.5 histoire does not start at all for me on windows, in a repo that worked fine on macOS. No error, no output, nothing. Terminal just blocks until I kill it.
I'm on Windows 11 and I have no problem running the reproduction of @noel-schenk.
Is this still happening?
Describe the bug
I'm running "npm run story:dev (histoire dev)" and getting the following error:
My DnButton.story.vue file:
Note that the same code is running successfully on Mac...
Reproduction
We can't repreduce this code, becase it's related to the specific OS.
System Info
Used Package Manager
npm
Validations