Comments (7)
FWIW, the error referenced in this issue's title is what I was getting simply because I hadn't run npm install --save vue-loader
(and then I had to first manually install all of the peer dependencies, since I am using npm v3, and then retry npm install --save vue-loader
and then it installed successfully and then my webpack bundle built successfully without the error).
It might be worth adding a reminder about actually installing the loader to the README.md, for slow folks like me... 😁
from vue-loader.
@davidrunger was my issue/resolution also. Thanks!
For anyone else that needs the list of the peer dependencies:
vue
vue-loader
vue-html-loader
css-loader
style-loader
babel-loader
babel-core
babel-plugin-transform-runtime
babel-preset-es2015
babel-runtime
vue-hot-reload-api
Or copy/paste version for your convenience:
npm install --save vue vue-loader vue-html-loader css-loader style-loader babel-loader babel-core babel-plugin-transform-runtime babel-preset-es2015 babel-runtime vue-hot-reload-api
(Without --save)
npm install vue vue-loader vue-html-loader css-loader style-loader babel-loader babel-core babel-plugin-transform-runtime babel-preset-es2015 babel-runtime vue-hot-reload-api
from vue-loader.
I'm seeing the same thing with custom components.
from vue-loader.
@bradstewart Are you exporting a constructor created by Vue.extend()
instead of a plain object? If that's the case it should now work in 4.0.10.
from vue-loader.
@yyx990803 So I can't quite figure out why the error printed to the console was from require('component.vue')
, the call stack led me back to Vue.use(VueRouter)
which was the actual problem. After updatingvue-router
and vue-loader
, everything looks good. (I am only exporting plain objects though).
from vue-loader.
Removing node_modules and installing it again helped.
from vue-loader.
#409 is helped
from vue-loader.
Related Issues (20)
- 使用了istanbul做测试覆盖率,希望能阻止istanbul对template部分的插桩处理
- How to customize Babel plugins during the compilation of Vue file templates?
- Getting this error: At least one <template> or <script> is required in a single file component. HOT 1
- 不依赖 resourceQuery 生成 module id 导致代码 hot-loader 出现问题
- [Question] Any loader hook provided before compile? HOT 2
- Vue 3.3. Provide fs option for @vue/compiler-sfc 3.3.0+ compileScript function HOT 1
- Bug Report: Issue with Webpack, Vue 3, and JSX HOT 1
- vue-loader v15版本打包时在::v-deep { ... } 中写多行注释时webpack5编译时会报 Module build failed (from . /node modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js):; TypeError: Cannot read properties of undefined (reading 'spaces") at /users/xxx/xxx/example.scss:15:1错误
- Build fails if ../.config/postcssrc is not readable HOT 1
- Can't import interface / type and use them with defineProps "failed to resolve import source" HOT 2
- Hash generated(for HMR) from relative path name is not unique in a microfrontend architecture
- d
- webpack5.0+vue2.0 使用vue-loader 15.10.0 打包 vue 文件---想兼容es5 HOT 1
- Compiling RuleSet failed: Unexpected property test in condition HOT 1
- vue cli3 在打包到时候会把项目中没有使用的图片文件打包输出到dist目录。 HOT 1
- 同一页面有两个不同scopeid HOT 3
- 使用swc-loader替换babel报错 HOT 1
- Build error: Cannot read properties of null (reading 'lang') HOT 2
- v17.3 breaks v-bind HOT 2
- vue2 Upgrade vue3 vue-loader browser error message: Uncaught TypeError: Object(...) is not a function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-loader.