Error Output:
\n[vite] Internal server error: Failed to resolve import \"@/components/GameBoard.vue\"\nError: Cannot find module '/src/components/GameBoard.vue'\n at resolve (node:internal/modules/esm/resolve:1233)\nAnd during build:
\nError: Cannot read properties of undefined (reading 'hooks')\n at createPluginContainer (vite/dist/node/chunks/dep-56f75469.js:5321)\nDoes anyone know how to fix these module resolution issues?
\nThanks!
","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"The error indicates that Vite can't resolve the file at @/components/GameBoard.vue.
\nPlease verify that:
\nThe file actually exists in src/components/.
\nThe filename matches exactly, including capitalization.
\nYour vite.config.js includes the correct alias:
\nresolve: { alias: { '@': '/src' } }
\nFixing the path or alias should resolve both errors.
Specific Build/Run Errors in Vue Web Game Project #14189
-
|
Hi, Commands: Error Output: And during build: Does anyone know how to fix these module resolution issues? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
The error indicates that Vite can't resolve the file at @/components/GameBoard.vue. |
Beta Was this translation helpful? Give feedback.
The error indicates that Vite can't resolve the file at @/components/GameBoard.vue.
Please verify that:
The file actually exists in src/components/.
The filename matches exactly, including capitalization.
Your vite.config.js includes the correct alias:
resolve: { alias: { '@': '/src' } }Fixing the path or alias should resolve both errors.