New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
init fails for quasar vite template #19151
Comments
@boid-com I'm having the same issue. Have you been able to resolve it? |
@NominalTrajectory @boid-com do you have a |
ok I tried again with a fresh quasar project and I see this error when running ERR! TypeError: vite.createFilter is not a function
ERR! at viteReact (/Users/boidcom/Dev/boid/boid-web/node_modules/@vitejs/plugin-react/dist/index.cjs:202:21)
ERR! at pluginConfig (/Users/boidcom/Dev/boid/boid-web/node_modules/@storybook/builder-vite/dist/vite-config.js:82:36)
ERR! at processTicksAndRejections (node:internal/process/task_queues:96:5)
ERR! at async commonConfig (/Users/boidcom/Dev/boid/boid-web/node_modules/@storybook/builder-vite/dist/vite-config.js:66:18)
ERR! at async createViteServer (/Users/boidcom/Dev/boid/boid-web/node_modules/@storybook/builder-vite/dist/vite-server.js:10:24)
ERR! at async Object.start (/Users/boidcom/Dev/boid/boid-web/node_modules/@storybook/builder-vite/dist/index.js:53:20)
ERR! at async Promise.all (index 0)
ERR! at async storybookDevServer (/Users/boidcom/Dev/boid/boid-web/node_modules/@storybook/core-server/dist/cjs/dev-server.js:207:28)
ERR! at async buildDevStandalone (/Users/boidcom/Dev/boid/boid-web/node_modules/@storybook/core-server/dist/cjs/build-dev.js:120:31)
ERR! at async buildDev (/Users/boidcom/Dev/boid/boid-web/node_modules/@storybook/core-server/dist/cjs/build-dev.js:174:5)
ERR! TypeError: vite.createFilter is not a function
ERR! at viteReact (/Users/boidcom/Dev/boid/boid-web/node_modules/@vitejs/plugin-react/dist/index.cjs:202:21)
ERR! at pluginConfig (/Users/boidcom/Dev/boid/boid-web/node_modules/@storybook/builder-vite/dist/vite-config.js:82:36)
ERR! at processTicksAndRejections (node:internal/process/task_queues:96:5)
ERR! at async commonConfig (/Users/boidcom/Dev/boid/boid-web/node_modules/@storybook/builder-vite/dist/vite-config.js:66:18)
ERR! at async createViteServer (/Users/boidcom/Dev/boid/boid-web/node_modules/@storybook/builder-vite/dist/vite-server.js:10:24)
ERR! at async Object.start (/Users/boidcom/Dev/boid/boid-web/node_modules/@storybook/builder-vite/dist/index.js:53:20)
ERR! at async Promise.all (index 0)
ERR! at async storybookDevServer (/Users/boidcom/Dev/boid/boid-web/node_modules/@storybook/core-server/dist/cjs/dev-server.js:207:28)
ERR! at async buildDevStandalone (/Users/boidcom/Dev/boid/boid-web/node_modules/@storybook/core-server/dist/cjs/build-dev.js:120:31)
ERR! at async buildDev (/Users/boidcom/Dev/boid/boid-web/node_modules/@storybook/core-server/dist/cjs/build-dev.js:174:5) |
@boid-com that error happens when there is a mismatch between the version of the vite-builder and vite itself. If you're using a version of vite less than 3.0, you'll need to either upgrade, or downgrade |
same problem, the solution did't help, the vite version is 3.0.0, @storybook/builder-vite is 0.2.3 // package.json
"dependencies": {
"@quasar/extras": "^1.0.0",
"axios": "^0.27.2",
"pinia": "^2.0.22",
"quasar": "^2.8.4",
"vue": "^3.2.40",
"vue-i18n": "^9.2.2",
"vue-router": "^4.1.5"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@intlify/vite-plugin-vue-i18n": "^6.0.3",
"@quasar/app-vite": "^1.0.0",
"@storybook/addon-actions": "^6.5.10",
"@storybook/addon-essentials": "^6.5.10",
"@storybook/addon-interactions": "^6.5.10",
"@storybook/addon-links": "^6.5.10",
"@storybook/builder-vite": "^0.2.3",
"@storybook/testing-library": "^0.0.13",
"@storybook/vue3": "^6.5.10",
"@types/node": "^12.20.21",
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
"@vitejs/plugin-vue": "^3.1.2",
"autoprefixer": "^10.4.2",
"babel-loader": "^8.2.5",
"eslint": "8.22.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-storybook": "^0.6.4",
"eslint-plugin-vue": "^9.0.0",
"node-sass": "^7.0.3",
"prettier": "^2.7.1",
"sass-loader": "^10.3.1",
"ts-loader": "^9.4.1",
"typescript": "^4.8.4",
"vue-loader": "^16.8.3"
}, |
@Nikitonu4 are you sure you're using vite 3? I just tried bootstrapping quasar myself, and I see that it installed vite 2.9.15. I'm working on getting it running, and will post a solution if I find one. |
I ran const vue = require("@vitejs/plugin-vue");
const { quasar, transformAssetUrls } = require("@quasar/vite-plugin");
module.exports = {
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
],
framework: "@storybook/vue3",
core: {
builder: "@storybook/builder-vite",
},
features: {
storyStoreV7: true,
},
async viteFinal(config) {
const plugins = config.plugins
// Remove the existing vue plugin that was added by storybook
.filter((p) => {
return p.name !== "vite:vue";
})
// Add configured vue plugin, and quasar plugin
.concat([
vue({ template: { transformAssetUrls } }),
quasar()
]);
return {
...config,
plugins,
};
},
}; |
indeed, after installing vite@3 dependency it worked, thanks! |
however, with vite 2.9.13 version of @storybook/builder-vite 0.1.39 doesn't work. It turns out that either the quasar or storybook assembly works, can you have a solution how to get @storybook/builder-vite with the 2nd version of vite? "devDependencies": {
"@babel/core": "^7.19.3",
"@intlify/vite-plugin-vue-i18n": "^6.0.3",
"@quasar/app-vite": "^1.1.2",
"@storybook/addon-actions": "^6.5.12",
"@storybook/addon-essentials": "^6.5.12",
"@storybook/addon-interactions": "^6.5.12",
"@storybook/addon-links": "^6.5.12",
"@storybook/addons": "^6.5.12",
"@storybook/builder-vite": "0.1.39",
"@storybook/testing-library": "^0.0.13",
"@storybook/vue3": "^6.5.10",
"@types/node": "^12.20.21",
"@typescript-eslint/eslint-plugin": "^5.39.0",
"@typescript-eslint/parser": "^5.39.0",
"@vitejs/plugin-vue": "^3.1.2",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^11.0.2",
"autoprefixer": "^10.4.2",
"babel-loader": "^8.2.5",
"eslint": "^8.22.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-storybook": "^0.6.4",
"eslint-plugin-vue": "^9.6.0",
"node-sass": "^7.0.3",
"prettier": "^2.7.1",
"sass-loader": "^10.3.1",
"ts-loader": "^9.4.1",
"typescript": "^4.8.4",
"vite": "^2.9.13",
"vue-loader": "^16.8.3"
}
|
@Nikitonu4 I was able to get Vite 2 working correctly as long as I installed |
Closing this out for now, but let me know if you're still having trouble. |
This one worked for me, downgraded to 0.1.x. Thanks! |
Describe the bug
With a basic quasar (vue3, typescript, vite) project. Running
npx storybook init
installs successfully butyarn storybook
fails with the errorTypeError: Cannot read properties of undefined (reading 'get')
To Reproduce
System
Additional context
Also, I noticed that build-webpack is being installed when quasar is using vite, seems incorrect.
official docs for quasar here:
quasar.dev
The text was updated successfully, but these errors were encountered: