So I updated all my stuff from Vue2 to Vue3 and now I'm seeing this...
ERROR Failed to compile with 1 error 5:59:31 PM
error in ./src/App.vue
Syntax Error: TypeError: Cannot read properties of undefined (reading 'styles')
ERROR in ./src/App.vue
Module build failed (from ./node_modules/vue-loader/dist/index.js):
TypeError: Cannot read properties of undefined (reading 'styles')
at Object.loader (/Users/xx/Desktop/Clients/xx/mi/node_modules/vue-loader/dist/index.js:96:34)
@ ./src/main.js 2:0-27 23:17-20
ERROR in ./src/views/About.vue
Module build failed (from ./node_modules/vue-loader/dist/index.js):
TypeError: Cannot read properties of undefined (reading 'styles')
at Object.loader (/Users/xx/Desktop/Clients/xx/mi/node_modules/vue-loader/dist/index.js:96:34)
@ ./src/router/index.js 23:21-81
@ ./src/main.js 4:0-29 21:2-8
ERROR in ./src/views/Home.vue
Module build failed (from ./node_modules/vue-loader/dist/index.js):
TypeError: Cannot read properties of undefined (reading 'styles')
at Object.loader (/Users/xx/Desktop/Clients/xx/mi/node_modules/vue-loader/dist/index.js:96:34)
@ ./src/router/index.js 3:0-36 14:15-19
@ ./src/main.js 4:0-29 21:2-8
webpack compiled with 3 errors
my NPM
[email protected] /Users/xx/Desktop/Clients/xx/mi
├── @vue/[email protected]
├── @vue/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
my NPM -g
├── @angular/[email protected]
├── @vue/[email protected]
├── @vue/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
So I updated all my stuff from Vue2 to Vue3 and now I'm seeing this...
ERROR Failed to compile with 1 error 5:59:31 PM
error in ./src/App.vue
Syntax Error: TypeError: Cannot read properties of undefined (reading 'styles')
ERROR in ./src/App.vue
Module build failed (from ./node_modules/vue-loader/dist/index.js):
TypeError: Cannot read properties of undefined (reading 'styles')
at Object.loader (/Users/xx/Desktop/Clients/xx/mi/node_modules/vue-loader/dist/index.js:96:34)
@ ./src/main.js 2:0-27 23:17-20
ERROR in ./src/views/About.vue
Module build failed (from ./node_modules/vue-loader/dist/index.js):
TypeError: Cannot read properties of undefined (reading 'styles')
at Object.loader (/Users/xx/Desktop/Clients/xx/mi/node_modules/vue-loader/dist/index.js:96:34)
@ ./src/router/index.js 23:21-81
@ ./src/main.js 4:0-29 21:2-8
ERROR in ./src/views/Home.vue
Module build failed (from ./node_modules/vue-loader/dist/index.js):
TypeError: Cannot read properties of undefined (reading 'styles')
at Object.loader (/Users/xx/Desktop/Clients/xx/mi/node_modules/vue-loader/dist/index.js:96:34)
@ ./src/router/index.js 3:0-36 14:15-19
@ ./src/main.js 4:0-29 21:2-8
webpack compiled with 3 errors
my NPM
[email protected] /Users/xx/Desktop/Clients/xx/mi
├── @vue/[email protected]
├── @vue/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
my NPM -g
├── @angular/[email protected]
├── @vue/[email protected]
├── @vue/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
Share
Improve this question
asked 16 hours ago
BostonAreaHumanBostonAreaHuman
1,4612 gold badges21 silver badges44 bronze badges
1 Answer
Reset to default 0It's your use of vue-template-compiler
, it needs to be replaced, as stated in the Vue migration guide
In
package.json
... replacevue-template-compiler
(if present) with@vue/compiler-sfc
Be sure to read and follow the entire guide to avoid issues during the migration process!