Skip to content
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

Module build failed: TypeError: Cannot read property 'vue' of undefined #1177

Closed
4096void opened this issue Mar 1, 2018 · 17 comments
Closed

Comments

@4096void
Copy link

4096void commented Mar 1, 2018

Module build failed: TypeError: Cannot read property 'vue' of undefined
at Object.module.exports (/some_path/node_modules/vue-loader/lib/loader.js:57:29)

@thomasklein
Copy link

Hi! You are using Webpack 4?

@4096void
Copy link
Author

4096void commented Mar 1, 2018

Sorry, I forgot update vue-loader@latest

@4096void 4096void closed this as completed Mar 1, 2018
@phalconVee
Copy link

i am having same issue:

App.vue:1 Uncaught Error: Module build failed: TypeError: Cannot read property 'vue' of undefined
at Object.module.exports (C:\xampp\htdocs\ci_vue\ci_vue\node_modules\vue-loader\lib\loader.js:61:18)
at Object.module.exports (C:\xampp\htdocs\ci_vue\ci_vue\node_modules\vue-loader\lib\loader.js:61:18)
at eval (webpack-internal:///./src/App.vue:1:7)
at Object../src/App.vue (http://localhost/ci_vue/ci_vue/src/dist/build.js:392:1)
at webpack_require (http://localhost/ci_vue/ci_vue/src/dist/build.js:20:30)
at eval (webpack-internal:///./src/main.js:3:62)
at Object../src/main.js (http://localhost/ci_vue/ci_vue/src/dist/build.js:415:1)
at webpack_require (http://localhost/ci_vue/ci_vue/src/dist/build.js:20:30)
at http://localhost/ci_vue/ci_vue/src/dist/build.js:69:18
at http://localhost/ci_vue/ci_vue/src/dist/build.js:72:10

@phalconVee
Copy link

my webpack version:

"webpack": "^3.11.0",

@wilmaribg
Copy link

for webcpack ^4.x

npm install vue-loader@14.2.2

@SmalldyCL1314
Copy link

my webpack version:

"webpack": "^3.11.0",

have you resolved this question?

@babacarcissedia
Copy link

have the same problem

@franksoong
Copy link

franksoong commented Aug 12, 2019

any solution on this issue?

@pjaer
Copy link

pjaer commented Aug 22, 2019

any solution on this issue?

Worked for me to update loader(s) to latest versions

@akerdi
Copy link

akerdi commented Sep 2, 2019

solved by downgrade sass-load to 7.1.0, worked piece:

sass-loader: 7.1.0
webpack: 3.6.0
vue-loader:  13.3.0
vue: 2.5.2

@realtebo
Copy link

realtebo commented Sep 11, 2019

I solved upgrading vue-loader to ^15.7.1 and removing explicit declaration of css-loader dependency.
Also, webpack is not explicited, but actually is being resolved as webpack@^4.27.1.

Note I'm using yarn

@jigark17
Copy link

i am using "webpack": "^4.41.6",

Module build failed: TypeError: Cannot read property 'vue' of undefined
at Object.module.exports (/some_path/node_modules/vue-loader/lib/loader.js:57:29)

give me the solution

@destinyvoilet
Copy link

for webcpack ^4.x

npm install vue-loader@14.2.2

what for webpack ^5.x ?

@dev-meta
Copy link

for webcpack ^4.x
npm install vue-loader@14.2.2

what for webpack ^5.x ?

v15 is ok

@Sandyzhao19
Copy link

npm install vue-loader@15 works for webpack ^5.x

@Norman5353
Copy link

i have this issue as well , several times downgraded the bootstrap and bootstrap-vue but not solved

"dependencies": {
"bootstrap": "^4.6.0",
"bootstrap-vue": "^2.23.1",
"core-js": "^3.8.3",
"vue": "^3.2.13"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"

Uncaught runtime errors:
×
ERROR
Cannot read properties of undefined (reading 'version')
TypeError: Cannot read properties of undefined (reading 'version')
at eval (webpack-internal:///./node_modules/bootstrap-vue/esm/vue.js:90:58)
at ./node_modules/bootstrap-vue/esm/vue.js (http://localhost:8081/js/chunk-vendors.js:3417:1)
at webpack_require (http://localhost:8081/js/app.js:491:33)
at fn (http://localhost:8081/js/app.js:725:21)
at eval (webpack-internal:///./node_modules/bootstrap-vue/esm/constants/events.js:66:62)
at ./node_modules/bootstrap-vue/esm/constants/events.js (http://localhost:8081/js/chunk-vendors.js:2372:1)
at webpack_require (http://localhost:8081/js/app.js:491:33)
at fn (http://localhost:8081/js/app.js:725:21)
at eval (webpack-internal:///./node_modules/bootstrap-vue/esm/components/alert/alert.js:9:76)
at ./node_modules/bootstrap-vue/esm/components/alert/alert.js (http://localhost:8081/js/chunk-vendors.js:84:1)

@SashankSingh97
Copy link

i have this issue as well , several times downgraded the bootstrap and bootstrap-vue but not solved

"dependencies": { "bootstrap": "^4.6.0", "bootstrap-vue": "^2.23.1", "core-js": "^3.8.3", "vue": "^3.2.13" }, "devDependencies": { "@babel/core": "^7.12.16", "@babel/eslint-parser": "^7.12.16", "@vue/cli-plugin-babel": "~5.0.0", "@vue/cli-plugin-eslint": "~5.0.0", "@vue/cli-service": "~5.0.0", "eslint": "^7.32.0", "eslint-plugin-vue": "^8.0.3", "webpack": "^5.89.0", "webpack-cli": "^5.1.4"

Uncaught runtime errors: × ERROR Cannot read properties of undefined (reading 'version') TypeError: Cannot read properties of undefined (reading 'version') at eval (webpack-internal:///./node_modules/bootstrap-vue/esm/vue.js:90:58) at ./node_modules/bootstrap-vue/esm/vue.js (http://localhost:8081/js/chunk-vendors.js:3417:1) at webpack_require (http://localhost:8081/js/app.js:491:33) at fn (http://localhost:8081/js/app.js:725:21) at eval (webpack-internal:///./node_modules/bootstrap-vue/esm/constants/events.js:66:62) at ./node_modules/bootstrap-vue/esm/constants/events.js (http://localhost:8081/js/chunk-vendors.js:2372:1) at webpack_require (http://localhost:8081/js/app.js:491:33) at fn (http://localhost:8081/js/app.js:725:21) at eval (webpack-internal:///./node_modules/bootstrap-vue/esm/components/alert/alert.js:9:76) at ./node_modules/bootstrap-vue/esm/components/alert/alert.js (http://localhost:8081/js/chunk-vendors.js:84:1)

do you find any solution ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests