[Bug Report][3.0.0-alpha.9][SSR] Cannot find module 'vuetify/lib/components'
See original GitHub issueEnvironment
Vuetify Version: 3.0.0-alpha.9 Vue Version: 3.0.11 Browsers: Chrome 91.0.4472.102 OS: Chromium OS 13904.55.0
Steps to reproduce
-
yarn install
-
yarn dev
- Go to https://localhost:3000
Expected Behavior
No error is thrown.
Actual Behavior
Error is thrown:
Error: Cannot find module 'vuetify/lib/components' from '/home/brillout/tmp/vuetify3-ssr/pages/_default'
at Function.resolveSync [as sync] (/home/brillout/tmp/vuetify3-ssr/node_modules/resolve/lib/sync.js:107:15)
at resolveFrom$3 (/home/brillout/tmp/vuetify3-ssr/node_modules/vite/dist/node/chunks/dep-11db14da.js:4076:29)
at resolve (/home/brillout/tmp/vuetify3-ssr/node_modules/vite/dist/node/chunks/dep-11db14da.js:73358:22)
at nodeRequire (/home/brillout/tmp/vuetify3-ssr/node_modules/vite/dist/node/chunks/dep-11db14da.js:73337:25)
at ssrImport (/home/brillout/tmp/vuetify3-ssr/node_modules/vite/dist/node/chunks/dep-11db14da.js:73290:20)
at eval (/pages/_default/vuetify.js:9:31)
at instantiateModule (/home/brillout/tmp/vuetify3-ssr/node_modules/vite/dist/node/chunks/dep-11db14da.js:73323:166)
Reproduction Link
https://github.com/brillout/vuetify3-ssr
Other comments
Hi, is vuetify supposed to work with SSR and Vite?
Trying to use Vuetify + Vite + SSR leads to an error where the npm package resolve
cannot find vuetify/lib/components
.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:16 (4 by maintainers)
Top Results From Across the Web
How do I resolve "Cannot find module" error using Node.js?
Using npm install installs the module into the current directory only (in a subdirectory called node_modules ). Is app.js located under ...
Read more >MBed terminates on start [Cannot find module 'eventemitter2']
Running on a 64 bit linux system. Running through console spits these errors. Error: Cannot find module 'eventemitter2' Require stack: ...
Read more >cannot find module 'vuex' or its corresponding type ...
I re-installed every package changed many settings but it still fails to load all paths and show the error above for all files....
Read more >998358 – can not run npm: Cannot find module 'inherits'
Description of problem: $ npm module.js:340 throw err; ^ Error: Cannot find module 'inherits' at Function.Module.
Read more >Cannot find module 'node-sass' - Visual Studio Feedback
Suddenly the builds stopped working. ERROR in ./src/global.scss Module build failed (from ./node_modules/mini-css-extract-plugin/dist/ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Alpha 11 now uses package exports, so you should be able to import from
vuetify/components
without an extension.That was for the dev environment which imports from src. To get prod working with vite you might have to change the import to
vuetify/lib/components/index.mjs
. I’ll see if adding package exports makes it work without the extension.